little-ds-toolkit
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -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 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38963