Breaking in 4.0.0
- Integer id columns are decimal strings — Every id column of integers (
id,*_id,game_pk,playerId, …) comes back as exact decimal strings on every surface — parsers, producers, loaders, HockeyTech analytics. Compare and join ids as strings;Number(row.game_id)for a safe number back. (changelog) - 400 / 422 raise
InvalidParameterError— For every family (it wasAssetFetchError), never retried; the message names host, path and status with a redacted excerpt of the body. (changelog) - Typed returns — generated row types for
parsed: true— TypeScript only. A wrapper's raw payload resolves tounknown(wasany); verified endpoints resolve to their row interfaces; the summary dispatchers toParsedTables. Narrow or cast a raw payload. (changelog) - Wrapper failures raise
NoDataError/AssetFetchError— Instead of raw axios errors.NoDataError= the fetch worked and there is nothing there (404, ESPN{ code: 404 });AssetFetchError= the fetch failed (403 / 429 / 5xx after retries, network). Retries followDEFAULT_RETRY_STATUSESwith backoff. (changelog)
Utilities
Not data functions
These utilities never fetch a provider payload by themselves — they transform, classify, configure or look things up. The data surface (every espn* / native wrapper and load* loader) is under ESPN Reference.
208 hand-written exports in 20 modules, in 10 categories (tools/codegen/utilities.yaml). Each category links to its page; every entry there shows the signature read from the TypeScript source.
| Category | exports | modules | what |
|---|---|---|---|
| Parsers | 26 | 1 | Turn a raw provider payload (ESPN, MLB, NHL, stats.nba.com, …) into tidy rows — the same functions \{ parsed: true \} runs. |
| Analytics | 26 | 2 | Pure frame-to-frame hockey analytics (shifts, on-ice, strength state, Corsi/Fenwick) and their league-parameterised fetch-and-enrich wrappers. |
| Odds math | 13 | 1 | Implied probabilities, vig removal and market blends — ports of sdv-py wexp.market. |
| Models | 13 | 1 | Offline models shipped with the package — cricket in-play win probability. |
| Producers | 29 | 2 | The ESPN basketball box-score and play-by-play producers — one summary payload in, the release-shaped rows out. |
| Discovery | 9 | 1 | Index the callable surface and resolve team / athlete / game names to ESPN ids. |
| Transforms | 12 | 2 | Parameter transforms the wrappers apply before a request, and the tidy.js toolkit for the rows after it. |
| HTTP core | 62 | 8 | Request pipeline, transports, auth providers, family auth helpers and the wrapper / loader type vocabulary. |
| Errors | 8 | 1 | The error vocabulary — NoDataError (nothing there) is never AssetFetchError (the fetch failed). |
| Configuration | 10 | 1 | Per-family transport / auth / retry / timeout configuration and the deprecation-warning codes. |
Generated by tools/codegen/generate.mjs from tools/codegen/utilities.yaml — see How this library is built.