Socket
Socket
Sign inDemoInstall

cp-data

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cp-data - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

5

CHANGELOG.md

@@ -0,1 +1,6 @@

v1.1.1
======
* Minor performance tweaks
v1.1.0

@@ -2,0 +7,0 @@ ======

24

lib/PriorityQueue.js

@@ -69,7 +69,8 @@ module.exports = PriorityQueue;

PriorityQueue.prototype.add = function(key, priority) {
if (!(key in this._keyIndices)) {
var entry = {key: key, priority: priority};
var index = this._arr.length;
this._keyIndices[key] = index;
this._arr.push(entry);
var keyIndices = this._keyIndices;
if (!(key in keyIndices)) {
var arr = this._arr;
var index = arr.length;
keyIndices[key] = index;
arr.push({key: key, priority: priority});
this._decrease(index);

@@ -130,3 +131,3 @@ return true;

var parent;
while (index > 0) {
while (index !== 0) {
parent = index >> 1;

@@ -144,7 +145,8 @@ if (arr[parent].priority < priority) {

var keyIndices = this._keyIndices;
var tmp = arr[i];
arr[i] = arr[j];
arr[j] = tmp;
keyIndices[arr[i].key] = i;
keyIndices[arr[j].key] = j;
var origArrI = arr[i];
var origArrJ = arr[j];
arr[i] = origArrJ;
arr[j] = origArrI;
keyIndices[origArrJ.key] = i;
keyIndices[origArrI.key] = j;
};

@@ -1,1 +0,1 @@

module.exports = '1.1.0';
module.exports = '1.1.1';
{
"name": "cp-data",
"version": "1.1.0",
"version": "1.1.1",
"description": "cp-data is a JavaScript library for some common data structures",

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

],
"scripts": {
"config": {
"blanket": {

@@ -24,3 +24,3 @@ "pattern": "lib",

"blanket": "1.x.x",
"browserify": "~2.33.1",
"browserify": "~2.35.1",
"chai": "1.7.x",

@@ -45,1 +45,2 @@ "grunt": "~0.4.1",

}
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