dry-underscore
Advanced tools
Comparing version 0.21.4 to 0.21.5
@@ -463,7 +463,4 @@ "use strict"; | ||
var result = {}; | ||
_.each(o, function(val, key, callback){ | ||
f(function(v, k){ | ||
if(!k){ throw(_.exception("omap: key must be specified.")); } | ||
result[k] = v; | ||
}, val, key, o) | ||
_.each(o, function(val, key){ | ||
f(function(v, k){ result[k || key] = v; }, val, key, o) | ||
}); | ||
@@ -470,0 +467,0 @@ return(result); |
@@ -854,2 +854,14 @@ "use strict"; | ||
test("omap no key", function(){ | ||
var o = { a: 'a', b: 'b', c: 'c' }; | ||
var expected = { "a": 1, "b": 2, "c": 3 }; | ||
eq(expected, _.omap(o, function(cb, val, key){ | ||
if(val === 'a'){ val = 1; } | ||
if(val === 'b'){ val = 2; } | ||
if(val === 'c'){ val = 3; } | ||
cb(val); | ||
})); | ||
}); | ||
test("plumb", function(){ | ||
@@ -856,0 +868,0 @@ |
{ | ||
"name": "dry-underscore", | ||
"version": "0.21.4", | ||
"version": "0.21.5", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "deep-diff": { |
{ | ||
"name": "dry-underscore", | ||
"version": "0.21.4", | ||
"version": "0.21.5", | ||
"main": "./index/node.index.js", | ||
@@ -5,0 +5,0 @@ "description": "The DRY Undescore Library", |
Sorry, the diff of this file is too big to display
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
1921514
23244