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

wrr-pool

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wrr-pool - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

lib/index.js

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

this.peers.sort(function (a, b) {
/*this.peers.sort(function (a, b) {
return a.weight - b.weight;
});
});*/

@@ -54,0 +54,0 @@ this.maxS = _.maxBy(this.peers, 'weight').weight;

@@ -9,3 +9,3 @@ {

},
"version": "1.0.0",
"version": "1.0.1",
"main": "./lib/index.js",

@@ -12,0 +12,0 @@ "keywords": ["weighted", "roundrobin", "round", "robin"],

@@ -89,3 +89,3 @@ 'use strict';

pool.update(function (v) { return v === 'B';}, 'B1', 4).should.be.eql(1);
pool.update(function (v) { return v === 'C';}, 'C1', 4).should.be.eql(0); // it was sorted
pool.update(function (v) { return v === 'C';}, 'C1', 4).should.be.eql(2);

@@ -122,3 +122,3 @@ _(0).range(12).map(pool.next.bind(pool)).countBy().value().should.be.eql({

pool.remove(function (v) { return v === 'C';}).should.be.eql(0);
pool.remove(function (v) { return v === 'C';}).should.be.eql(2);

@@ -125,0 +125,0 @@ _(0).range(7).map(pool.next.bind(pool)).countBy().value().should.be.eql({

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