Skip to main content
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 was AssetFetchError), 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 to unknown (was any); verified endpoints resolve to their row interfaces; the summary dispatchers to ParsedTables. 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 follow DEFAULT_RETRY_STATUSES with 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.

Categoryexportsmoduleswhat
Parsers261Turn a raw provider payload (ESPN, MLB, NHL, stats.nba.com, …) into tidy rows — the same functions \{ parsed: true \} runs.
Analytics262Pure frame-to-frame hockey analytics (shifts, on-ice, strength state, Corsi/Fenwick) and their league-parameterised fetch-and-enrich wrappers.
Odds math131Implied probabilities, vig removal and market blends — ports of sdv-py wexp.market.
Models131Offline models shipped with the package — cricket in-play win probability.
Producers292The ESPN basketball box-score and play-by-play producers — one summary payload in, the release-shaped rows out.
Discovery91Index the callable surface and resolve team / athlete / game names to ESPN ids.
Transforms122Parameter transforms the wrappers apply before a request, and the tidy.js toolkit for the rows after it.
HTTP core628Request pipeline, transports, auth providers, family auth helpers and the wrapper / loader type vocabulary.
Errors81The error vocabulary — NoDataError (nothing there) is never AssetFetchError (the fetch failed).
Configuration101Per-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.