Comparing version 0.7.1 to 0.7.2
@@ -174,3 +174,3 @@ // Load modules | ||
var common = []; | ||
var hash = exports.mapToObject(array1); | ||
var hash = (array1 instanceof Array ? exports.mapToObject(array1) : array1); | ||
var found = {}; | ||
@@ -177,0 +177,0 @@ for (var i = 0, il = array2.length; i < il; ++i) { |
{ | ||
"name": "hoek", | ||
"description": "General purpose node utilities", | ||
"version": "0.7.1", | ||
"version": "0.7.2", | ||
"author": "Eran Hammer <eran@hueniverse.com> (http://hueniverse.com)", | ||
@@ -6,0 +6,0 @@ "contributors":[ |
@@ -293,2 +293,11 @@ // Load modules | ||
}); | ||
it('should return the common objects of object and array', function (done) { | ||
var array1 = [1, 2, 3, 4, 4, 5, 5]; | ||
var array2 = [5, 4, 5, 6, 7]; | ||
var common = Hoek.intersect(Hoek.mapToObject(array1), array2); | ||
expect(common.length).to.equal(2); | ||
done(); | ||
}); | ||
}); | ||
@@ -295,0 +304,0 @@ |
Sorry, the diff of this file is not supported yet
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
968
86521