New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

arpad

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arpad - npm Package Compare versions

Comparing version 0.1.0 to 0.1.2

14

index.js

@@ -19,5 +19,5 @@ 'use strict';

*
* @param {Integer|Object} k_factor The maximum rating change, defaults to 32
* @param {Integer} min The minimum value a calculated rating can be
* @param {Integer} max Integer The maximum value a calculated rating can be
* @param {Number|Object} k_factor The maximum rating change, defaults to 32
* @param {Number} min The minimum value a calculated rating can be
* @param {Number} max Integer The maximum value a calculated rating can be
*/

@@ -76,3 +76,3 @@ var ELO = function(k_factor, min, max) {

*
* @return {Number} The minimum rating value, e.g. 2700
* @return {Number} The maximum rating value, e.g. 2700
*/

@@ -93,8 +93,6 @@ ELO.prototype.getMax = function() {

ELO.prototype.setKFactor = function(k_factor) {
this.k_factor = k_factor;
if (!k_factor) {
this.k_factor = 32;
} else if (parseInt(k_factor, 10)) {
this.k_factor = k_factor;
} else if (typeof(k_factor) === 'object') {
this.k_factor = k_factor;
}

@@ -101,0 +99,0 @@

{
"name": "arpad",
"version": "0.1.0",
"version": "0.1.2",
"description": "An implementation of the ELO Rating System",

@@ -18,3 +18,3 @@ "main": "index.js",

],
"author": "Thomas Hunter II",
"author": "Thomas Hunter II <me@thomashunter.name>",
"license": "MIT",

@@ -26,8 +26,8 @@ "directories": {

"type": "git",
"url": "https://github.com/tlhunter/node-arpad.git"
"url": "https://github.com/PhobosRising/node-arpad.git"
},
"bugs": {
"url": "https://github.com/tlhunter/node-arpad/issues"
"url": "https://github.com/PhobosRising/node-arpad/issues"
},
"homepage": "https://github.com/tlhunter/node-arpad"
"homepage": "https://github.com/PhobosRising/node-arpad"
}

@@ -150,2 +150,14 @@ 'use strict';

assert.equal(alice_new_rating, alice_new_rating_convenient);
expected_alice_score = elo.expectedScore(alice_rating, bob_rating);
alice_new_rating = elo.newRating(expected_alice_score, 0, alice_rating);
alice_new_rating_convenient = elo.newRatingIfLost(alice_rating, bob_rating);
assert.equal(alice_new_rating, alice_new_rating_convenient);
expected_alice_score = elo.expectedScore(alice_rating, bob_rating);
alice_new_rating = elo.newRating(expected_alice_score, 0.5, alice_rating);
alice_new_rating_convenient = elo.newRatingIfTied(alice_rating, bob_rating);
assert.equal(alice_new_rating, alice_new_rating_convenient);
});

@@ -152,0 +164,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc