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

little-ds-toolkit

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

little-ds-toolkit - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

4

lib/heap.js

@@ -31,6 +31,6 @@

var tmp = this.data[x];
this.onMove(this.data[x], y, x);
this.onMove(this.data[y], x, y);
this.data[x] = this.data[y];
this.data[y] = tmp;
this.onMove(this.data[x], x, y);
this.onMove(this.data[y], y, x);
};

@@ -37,0 +37,0 @@

@@ -30,7 +30,7 @@ var Heap = require('./heap');

this.minHeap = new Heap(wrappedComp, function (item, index) {
this.minHeap = new Heap(wrappedComp, function (item, index, previousIndex) {
item.minIndex = index;
});
this.maxHeap = new Heap(invertComp(wrappedComp), function (item, index) {
this.maxHeap = new Heap(invertComp(wrappedComp), function (item, index, previousIndex) {
item.maxIndex = index;

@@ -37,0 +37,0 @@ });

{
"name": "little-ds-toolkit",
"version": "0.2.0",
"version": "0.2.1",
"description": "A small collection of useful data structures",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -89,3 +89,3 @@ little-ds-toolkit

var itemPos = {};
var heap = new Heap(undefined, function (item, previousPos, nextPos) {
var heap = new Heap(undefined, function (item, nextPos, previousPos) {
itemPos[item.id] = nextPos;

@@ -92,0 +92,0 @@ });

@@ -229,3 +229,3 @@ var assert = require('chai').assert;

var positions = {};
var h = new Heap(undefined, function (item, index) {
var h = new Heap(undefined, function (item, index, previousIndex) {
positions[item] = index;

@@ -232,0 +232,0 @@ });

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