dry-underscore
Advanced tools
Comparing version 0.23.7 to 0.24.1
@@ -169,2 +169,5 @@ "use strict"; | ||
_.a = function(a){ return(_.toArray(a)); }; | ||
_.ea = function(a){ if(!_.is_array(a)){ return([a]); }else{ return(a); } }; | ||
_.mea = function(a){ a = _.ea(a); return(_.map(a, _.ea)); }; | ||
_.concat = function(){ return(Array.prototype.concat.apply([], arguments)); }; | ||
@@ -171,0 +174,0 @@ |
@@ -871,2 +871,18 @@ "use strict"; | ||
test("_.a", function(){ | ||
eq(_.a([]), []); | ||
eq(_.a("a"), ["a"]); | ||
eq(_.a([1, 2]), [1, 2]); | ||
}); | ||
test("_.ma", function(){ | ||
eq(_.mea([]), []); | ||
eq(_.mea([[]]), [[]]); | ||
eq(_.mea("a"), [["a"]]); | ||
eq(_.mea([1, 2]), [[1], [2]]); | ||
eq(_.mea([1, [2]]), [[1], [2]]); | ||
eq(_.mea([{a: 1, b: 2}, [2]]), [[{a: 1, b: 2 }], [2]]); | ||
}); | ||
test("omap", function(){ | ||
@@ -873,0 +889,0 @@ var o = { a: 'a', b: 'b', c: 'c' }; |
{ | ||
"name": "dry-underscore", | ||
"version": "0.23.7", | ||
"version": "0.24.1", | ||
"main": "./index/node.index.js", | ||
@@ -5,0 +5,0 @@ "description": "The DRY Underscore Library", |
@@ -13,3 +13,3 @@ "use strict"; | ||
test_server.start_server(function(){ | ||
_.shell("./node_modules/phantomjs-prebuilt/bin/phantomjs ./node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js http://localhost:9999/index.html dot", function(code){ | ||
_.shell("./bin/resolve_run phantomjs-prebuilt/bin/phantomjs `bin/resolve mocha-phantomjs-core/mocha-phantomjs-core.js` http://localhost:9999/index.html dot", function(code){ | ||
test_server.stop_server(function(){ | ||
@@ -16,0 +16,0 @@ if(code){ process.exit(code); } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
2092984
136
26633
17