Gathering detailed insights and metrics for mongoleaderboard
Gathering detailed insights and metrics for mongoleaderboard
Gathering detailed insights and metrics for mongoleaderboard
Gathering detailed insights and metrics for mongoleaderboard
A node.js module for implementing a simple leaderboard with mongodb
npm install mongoleaderboard
Typescript
Module System
Min. Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
3 Stars
23 Commits
2 Forks
1 Watchers
1 Branches
1 Contributors
Updated on Jun 18, 2021
Latest Version
0.0.13
Package Id
mongoleaderboard@0.0.13
Size
2.82 kB
NPM Version
1.2.32
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
A node.js module for implementing a simple leaderboard with mongodb
1var Leaderboard = require('mongoleaderboard'); 2var mongoUri = 'mongodb://localhost/mydb'; 3var leaderboard = new Leaderboard(mongoUri);
You can also specify options
1var options = {}; 2// specify a leaderboard at collection named highscores 3// with page sizes of 5, 2 pages, that refreshes daily at 5:00 4options.collection = 'highscores'; // defaults to leaderboard 5options.page_size = 5; // defaults to 20 6options.num_pages = 2; // defaults to 1 7options.start_time = { // time of day to refresh 8 'milliseconds':0, 9 'seconds':0, 10 'minutes':0, 11 'hours':5 12 }; // defaults to midnight 13options.duration = 1000 * 60 * 60 * 24; // time in milliseconds 14 // defaults to infinity 15var leaderboard = new Leaderboard(mongoUri, options);
1// executes the callback passing the argument true (1)
2// if the score is a high score, otherwise pass false (0)
3leaderboard.check(score, callback);
4
5// overwrites the lowest score on the leaderboard if the given score
6// is larger. if the force parameter is supplied, it will overwrite
7// no matter what. member is an object with the other info a highscore needs
8// e.g. member = {'initials':'TJK'}
9// executes the callback with two arguments, err and the saved member object
10leaderboard.postHighScore(highscore, member, callback, force);
11// also aliased as
12leaderboard.post(highscore, member, callback, force);
13
14// executes the callback on the two arguments err and scores,
15// where scores is an array of objects
16leaderboard.getHighScores(callback);
17// also aliased as
18leaderboard.get(callback);
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/23 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More