Session 7d: Audit fixes - rate limiting, error leak, parallel parlays, analyze cache, bundle analyzer
This commit is contained in:
@@ -31,6 +31,12 @@ function inactive(reason) {
|
||||
// Normalize player names for matching across data sources. ParlayAPI may
|
||||
// emit "Brunson, Jalen" while ESPN emits "Jalen Brunson" — strip case,
|
||||
// punctuation, suffixes, and collapse whitespace so equivalence works.
|
||||
//
|
||||
// DUP-1 (Session 7c): a near-identical implementation lives in
|
||||
// scripts/populate-player-ids.js. The script's variant keeps digits
|
||||
// (some legacy roster fields encode jersey numbers); this one strips
|
||||
// them because trap matches go by player name only. If the script
|
||||
// stops needing digits, consolidate to a shared util.
|
||||
function normalizeName(name) {
|
||||
if (!name) return '';
|
||||
return String(name)
|
||||
|
||||
Reference in New Issue
Block a user