Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

teslo

williamgrosset1kMIT0.6.1TypeScript support: included

Elo rating system

typescript, elo, rating, elo-rating, elo-rating-system, multiplayer, games, matchmaking, leaderboard, ranking-system, player-stats

readme

logo

Build status NPM version Downloads Dependencies Build size

A lightweight JavaScript library for calculating elo rating in multiplayer games.

Quickstart

Install the teslo package.

npm install teslo

Create a Duel and calculate elo ratings.

import { Player, Duel } from 'teslo'

// Create a duel between 2 players
const match = new Duel([new Player('1', 1000), new Player('2', 900)])

// Calculate elo ratings for player 1 win
const results = match.calculate('1')

/*
[
  {
    id: '1',
    elo: 1012
  },
  {
    id: '2',
    elo: 888
  }
]
*/

Documentation

Visit teslo.dev/docs.

License

MIT