Comparing version 0.2.3 to 0.3.0
@@ -10,3 +10,3 @@ var annotate = require('annotate'); | ||
var map = annotate('map', 'Maps using given callback') | ||
module.exports = annotate('map', 'Maps using given callback') | ||
.on(is.fn, is.array, function(cb, o) { | ||
@@ -22,5 +22,10 @@ var ret = []; | ||
.on(is.fn, is.object, function(cb, o) { | ||
return zip.toObject(zip(keys(o), map(cb, values(o)))); | ||
var objectKeys = keys(o); | ||
var ret = []; | ||
each(function(v, i) { | ||
ret.push(cb(v[0], v[1], i)); | ||
}, zip(objectKeys, values(o))); | ||
return zip.toObject(zip(objectKeys, ret)); | ||
}); | ||
module.exports = map; |
@@ -5,3 +5,3 @@ { | ||
"author": "Juho Vepsalainen <bebraw@gmail.com>", | ||
"version": "0.2.3", | ||
"version": "0.3.0", | ||
"dependencies": { | ||
@@ -8,0 +8,0 @@ "annois": "0.3.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
12445
334