Comparing version 0.2.0 to 0.2.1
@@ -22,10 +22,27 @@ var annotate = require('annotate'); | ||
}). | ||
satisfies(function(ret) { | ||
var zips = ret.filter(function(v) { | ||
return is.array(v); | ||
satisfies(isZip); | ||
var toObject = annotate('zip.toObject', 'Converts given zip into an object'). | ||
on(isZip, function(a) { | ||
var ret = {}; | ||
var i, len; | ||
a.forEach(function(v) { | ||
ret[v[0]] = v[1]; | ||
}); | ||
return is.array(ret) && zips.length == ret.length; | ||
return ret; | ||
}). | ||
satisfies(is.object); | ||
zip.toObject = toObject; | ||
function isZip(a) { | ||
var zips = a.filter(function(v) { | ||
return is.array(v); | ||
}); | ||
return is.array(a) && zips.length == a.length; | ||
} | ||
module.exports = zip; |
@@ -5,3 +5,3 @@ { | ||
"author": "Juho Vepsalainen <bebraw@gmail.com>", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"dependencies": { | ||
@@ -8,0 +8,0 @@ "funkit": "0.7.7", |
@@ -14,4 +14,2 @@ var generate = require('annogenerate'); | ||
fuzz(zip, function(op, a, b) { | ||
var res, matches; | ||
if(!is.defined(b)) { | ||
@@ -22,9 +20,7 @@ a = keys(a); | ||
res = op(a, b); | ||
var res = op(a, b); | ||
matches = res.filter(function(v, i) { | ||
return res.filter(function(v, i) { | ||
return equals(v[0], a[i]) && equals(v[1], b[i]); | ||
}); | ||
return matches.length == res.length; | ||
}).length == res.length; | ||
}); |
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
4588
9
71