Comparing version 0.0.3 to 0.0.4
@@ -5,3 +5,3 @@ { | ||
"description": "A data structure that combines a hash and an array for CRUD operations by object keys or index.", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"main": "index.js", | ||
@@ -8,0 +8,0 @@ "url": "https://github.com/joshjung/hash-array", |
@@ -96,2 +96,3 @@ var HashArray = function(keyFields, callback) { | ||
removeAll: function() { | ||
var old = this._list.concat(); | ||
this._map = {}; | ||
@@ -101,3 +102,3 @@ this._list = []; | ||
if (this.callback) { | ||
this.callback('removeAll'); | ||
this.callback('remove', old); | ||
} | ||
@@ -104,0 +105,0 @@ }, |
@@ -277,3 +277,6 @@ var assert = require('assert'), | ||
it('Should have a "remove" callback.', function() { | ||
assert.equal(type, 'removeAll'); | ||
assert.equal(type, 'remove'); | ||
assert.strictEqual(what[0], item1); | ||
assert.strictEqual(what[1], item2); | ||
assert.strictEqual(what[2], item3); | ||
}); | ||
@@ -280,0 +283,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
13511
349