A simple ELO system lib.
To install the latest version:
# NPM
npm i simplelo
This library only has three functions.
Calculates the expected match outcome.
import { expected } from 'elo.js'
expected(1200, 1400) // -> 0.24
// 1200 player has 24% chance to win.
Gets the new rating of the target player.
import { newRating } from 'elo.js'
newRating(1200, 1400, 1) // -> 1224
Gets the rating difference of the target player.
import { ratingDifference } from 'elo.js'
ratingDifference(1200, 1400, 1) // -> 24