Minimalistic leaderboards for the ranking of non-unique usernames.
Every new name/score pair added to a leaderboard will generate a unique id associated with the transaction. This id can be stored and used to query additional information about the transaction at a later time.
npm install rank-me
var Leaderboard = ;var leaderboard = 'leaderboard_id' options;
Gets the total # of stores stored in the leaderboard.
Adds a score to the leaderboard for a given user name.
Names are not required to be unique. For every name/score that is added to the leaderboard, a unique
entryId will be generated.
This unique id is passed as a parameter to the callback of
Using this unique id, information about the added score entry can be
queried if desired.
Gets the rank for a given leaderboard entry.
Gets the names and scores for a given range of ranks.
toRank indices are both inclusive.
// Get the top 3 ranks:leaderboard;