![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@sahirb/basketball-reference
Advanced tools
Javscript helpers to parse the basketball-reference.com box scores page
Parse basketball-reference.com for NBA data! 🏀 🧬
Currently supports getting game totals. For example, if we're interested in 2023-11-16
https://www.basketball-reference.com/boxscores/?month=11&day=16&year=2023
const bref = require('@sahirb/basketball-reference')
bref.getBoxScores({
year: 2023,
month: 11,
day: 16
});
// -- result --
{
gameDate: '2023-11-16',
numExtraPeriods: 0,
periodBreakdown: [
{ period: 1, roadTotal: 39, homeTotal: 24 },
{ period: 2, roadTotal: 28, homeTotal: 36 },
{ period: 3, roadTotal: 27, homeTotal: 25 },
{ period: 4, roadTotal: 34, homeTotal: 24 }
],
roadTeam: 'Oklahoma City',
homeTeam: 'Golden State',
gameTotal: 237,
roadTeamTotal: 128,
homeTeamTotal: 109,
winningTeam: 'Oklahoma City',
losingTeam: 'Golden State',
winningTeamScore: 128,
losingTeamScore: 109
},
{
... // NJ Nets at Miami
}
Data Model
BoxScore: {
gameDate: string,
numExtraPeriods: number,
roadTeam: string,
homeTeam: string,
gameTotal: number,
roadTeamTotal: number,
homeTeamTotal: number,
winningTeam: string,
losingTeam: string,
winningTeamScore: number,
losingTeamScore: number,
periodBreakdown: []PeriodBreakdown
}
PeriodBreakdown: {
period: number,
roadTotal: number,
homeTotal: number
}
Functions
getBoxScores(date) => Promise<[]BoxScore>
date: {
year: number,
month: number,
day: number
}
getBoxScoresForDates(last_game_date, num_additional_days, file_path, box_score_transformation) => Promise<[]BoxScore>
last_game_date: {
year: number,
month: number,
day: number
}
num_additional_days: number // additional days going back from last_game_date
file_path?: string // (optional) local file to save result to
box_score_transformation?: (BoxScore) => void // (optional) callback applied to each BoxScore in the response (and in the local file if file_path specified)
How to use - simple
const bref = require('@sahirb/basketball-reference')
const date = {
year: 2023,
month: 11,
day: 16
};
bref.getBoxScores(date).then(boxScores => {
boxScores.forEach(boxScore => console.log(boxScore));
});
How to use - advanced (save multiple days to file with new 'feeling' column)
const bref = require('@sahirb/basketball-reference')
const last_game_date = {
year: 2023,
month: 11,
day: 16
};
const num_additional_days = 2;
const local_file_path = "/Users/boghani/basketball-reference-js-box-score/output_json.txt";
const box_score_transformation = (boxScore) => {
let feeling = 'snooze fest';
if (boxScore.gameTotal > 220) {
feeling = 'wow points and stuff';
if (boxScore.winningTeamScore - boxScore.losingTeamScore < 10) {
feeling = 'be still my heart <4';
}
}
boxScore.feeling = feeling;
};
bref.getBoxScoresForDates(last_game_date, num_additional_days, local_file_path, box_score_transformation).then(boxScores => {
boxScores.forEach(boxScore => console.log(boxScore));
});
FAQs
NBA data and Javascript APIs to access stats. Also the util APIs that were used to build the stat files.
The npm package @sahirb/basketball-reference receives a total of 0 weekly downloads. As such, @sahirb/basketball-reference popularity was classified as not popular.
We found that @sahirb/basketball-reference demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.