The PowerScore package.

How a game gets scored. The five signals, the boosts, the penalties and the types.

  • Score your first game with PowerScore

    Install the powerscore package and score one live game in a few lines of code, ending with a number you can see printed to your terminal.

  • Score a game from live data

    Map an ESPN scoreboard response onto a Game object, keep a score history across polls, and add your own boosts on top of the total.

  • The five PowerScore signals

    What closeness, late-game pressure, momentum, lead changes, and comeback factor each measure, why they're weighted the way they are, and what they ignore.

  • PowerScore boosts and penalties

    Every boost and penalty PowerScore applies on top of its five signals, with the exact condition that triggers each one and its effect on the total.

  • Sport and league configuration

    Every field on SportTypeConfig and LeagueConfig, their defaults across all six sports and 31 leagues, and how a sport's idea of "close" is set.

  • PowerScore API reference

    Every function and constant powerscore exports, with its signature, parameters, return value, and behavior when an input is missing or invalid.

  • PowerScore TypeScript types

    Every field on Game, ScoreSnapshot, PowerScoreResult, and the config types, which ones are optional, and what happens when an optional one is missing.