![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.
Tiebreak is a TypeScript library for calculating various tournament tiebreak scores. The focus lies on chess tournaments and implementing the algorithms specified by FIDE, the world chess organization.
Calculation of the following tiebreakers:
Configurable adjustments for unplayed games:
Built in calculation of entire tournament rankings
Note: Only individual Swiss tournaments are currently supported. Team tournaments and round robin tournaments are not implemented correctly yet.
npm install --save tiebreak
First, you need to create a Results
object with all relevant pairing information. You can use an arbitrary string or number to identify players.
import { Results, TournamentType } from "tiebreak"
const results = new Results(TournamentType.SWISS, [
{
// Example round 1: Player D did not show up
pairings: [
{ white: "C", black: "A", scoreWhite: 0.5, scoreBlack: 0.5, forfeited: false },
{ white: "B", black: "D", scoreWhite: 1, scoreBlack: 0, forfeited: true },
],
},
{
// Example round 2: Player D was not paired, player C received a bye
pairings: [{ white: "A", black: "B", scoreWhite: 0, scoreBlack: 1, forfeited: false }],
pairingAllocatedByes: ["C"],
},
])
You can now calculate a specific tiebreak score for a given player and round like this:
const tiebreaker = new Tiebreaker(results, UnplayedRoundsAdjustment.FIDE_2023)
console.log(tiebreaker.buchholz("A", 2))
// Output: 3.5
Or you can just calculate an entire ranking with multiple tiebreakers:
console.log(tiebreaker.ranking(2, [Tiebreak.SCORE, Tiebreak.BUCHHOLZ]))
/*
Output:
[
{ rank: 1, playerId: "B", scores: [2, 2.5] },
{ rank: 2, playerId: "C", scores: [1.5, 2] },
{ rank: 3, playerId: "A", scores: [0.5, 3.5] },
{ rank: 4, playerId: "D", scores: [0, 0] },
]
*/
npm run build
npm run test
or npm run test:watch
npm run test:coverage
(Not working yet?)npm run format
npm run lint
npm run spell:check
Deployment procedure:
npm run build
npm publish
FAQs
Calculation of chess tournament tiebreaks compliant with FIDE regulations
The npm package tiebreak receives a total of 4 weekly downloads. As such, tiebreak popularity was classified as not popular.
We found that tiebreak demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.