array-tools
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -285,2 +285,4 @@ "use strict"; | ||
result.push(a[i]); | ||
} else { | ||
break; | ||
} | ||
@@ -287,0 +289,0 @@ } |
{ | ||
"name": "array-tools", | ||
"author": "Lloyd Brookes <75pound@gmail.com>", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "Useful functions for working with arrays", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/75lb/array-tools.git", |
var test = require("tape"), | ||
w = require("../"); | ||
a = require("../"); | ||
@@ -9,7 +9,7 @@ test("findWhere", function(t){ | ||
]; | ||
t.deepEqual(w.findWhere(arr, { result: true }), null); | ||
t.deepEqual(w.findWhere(arr, { result: false }), { result: false, number: 1 }); | ||
t.deepEqual(w.findWhere(arr, { result: false, number: 3 }), null); | ||
t.deepEqual(w.findWhere(arr, { result: false, number: 2 }), { result: false, number: 2 }); | ||
t.deepEqual(a.findWhere(arr, { result: true }), null); | ||
t.deepEqual(a.findWhere(arr, { result: false }), { result: false, number: 1 }); | ||
t.deepEqual(a.findWhere(arr, { result: false, number: 3 }), null); | ||
t.deepEqual(a.findWhere(arr, { result: false, number: 2 }), { result: false, number: 2 }); | ||
t.end(); | ||
}); |
var test = require("tape"), | ||
w = require("../"); | ||
a = require("../"); | ||
test("without (array)", function(t){ | ||
var array = [ 1,2,3,4 ]; | ||
t.deepEqual(w.without(array, [ 2, 3 ]), [ 1, 4 ]); | ||
t.deepEqual(a.without(array, [ 2, 3 ]), [ 1, 4 ]); | ||
t.end(); | ||
}); |
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
43903
22
940