Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redis-rank

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis-rank - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

1

dist/Common.js

@@ -6,2 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.buildScript = void 0;
var fs_1 = __importDefault(require("fs"));

@@ -8,0 +9,0 @@ var COMMON = fs_1.default.readFileSync(__dirname + '/common.lua', 'utf8');

19

dist/index.js
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./Leaderboard"));
__export(require("./PeriodicLeaderboard"));
__export(require("./LeaderboardMatrix"));
__exportStar(require("./Leaderboard"), exports);
__exportStar(require("./PeriodicLeaderboard"), exports);
__exportStar(require("./LeaderboardMatrix"), exports);

@@ -39,2 +39,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.Leaderboard = void 0;
var Common_1 = require("./Common");

@@ -121,3 +122,3 @@ var Leaderboard = /** @class */ (function () {

score = _a.sent();
return [2 /*return*/, parseInt(score, 10)];
return [2 /*return*/, parseFloat(score)];
}

@@ -182,3 +183,3 @@ });

id: id,
score: parseInt(result[0], 10),
score: parseFloat(result[0]),
rank: result[1] + 1

@@ -201,3 +202,3 @@ }];

score = _a.sent();
return [2 /*return*/, score === null ? null : parseInt(score, 10)];
return [2 /*return*/, score === null ? null : parseFloat(score)];
}

@@ -246,3 +247,3 @@ });

id: result[i],
score: parseInt(result[i + 1], 10),
score: parseFloat(result[i + 1]),
rank: rank++

@@ -325,3 +326,3 @@ });

id: result[1][i],
score: parseInt(result[1][i + 1], 10),
score: parseFloat(result[1][i + 1]),
rank: 1 + result[0] + rank++

@@ -328,0 +329,0 @@ });

@@ -39,2 +39,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.LeaderboardMatrix = void 0;
var PeriodicLeaderboard_1 = require("./PeriodicLeaderboard");

@@ -254,3 +255,3 @@ var Common_1 = require("./Common");

this.options.features.map(function (f, f_i) {
entry[f.name] = parseInt(result[f_i], 10);
entry[f.name] = parseFloat(result[f_i]);
});

@@ -336,3 +337,3 @@ return [2 /*return*/, entry];

_this.options.features.map(function (f, f_i) {
entry[f.name] = parseInt(result[1][f_i][index], 10);
entry[f.name] = parseFloat(result[1][f_i][index]);
});

@@ -339,0 +340,0 @@ return entry;

@@ -17,2 +17,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.PeriodicLeaderboard = void 0;
var Leaderboard_1 = require("./Leaderboard");

@@ -19,0 +20,0 @@ var moment_1 = __importDefault(require("moment"));

{
"name": "redis-rank",
"version": "1.5.0",
"version": "1.5.1",
"description": "Back-end to generate and manage leaderboards using Redis. Written in TypeScript and Promise-based.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -77,3 +77,3 @@ # redis-rank

lb.add("dave", 42);
lb.add("eve", 54);
lb.incr("eve", 54); // incr will create an entry if it doesn't exists

@@ -80,0 +80,0 @@ // update entries

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