Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "stac", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Maintain a sorted stack of things.", | ||
@@ -5,0 +5,0 @@ "main": "stac.js", |
@@ -106,3 +106,5 @@ | ||
this._sort(); | ||
this._stack.forEach(iterator, thisArg); | ||
this._stack.forEach(function (item, i) { | ||
iterator.call(thisArg, item.obj, i); | ||
}, thisArg); | ||
}; | ||
@@ -109,0 +111,0 @@ |
@@ -115,3 +115,17 @@ var Stac = require('../'); | ||
it('can loop over the items', function () { | ||
var check = []; | ||
stack.add(1); | ||
stack.add(2); | ||
stack.add(3); | ||
stack.forEach(function (num) { | ||
check.push(num); | ||
}); | ||
assert.deepEqual(check, [1, 2, 3]); | ||
}); | ||
}); | ||
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
7683
208