mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 15:04:58 +00:00
Update std.js
This commit is contained in:
parent
58bf6b5ee9
commit
e91d9bd859
17
lib/std.js
17
lib/std.js
|
@ -270,20 +270,6 @@ function addslashes(s) {
|
|||
;
|
||||
};
|
||||
|
||||
function cartesian(arr) {
|
||||
return arr.reduce(function(a, b) {
|
||||
return a.map(function(x) {
|
||||
return b.map(function(y) {
|
||||
return x.concat([y]);
|
||||
})
|
||||
}).reduce(function(a, b) {
|
||||
return a.concat(b);
|
||||
}, []);
|
||||
}, [
|
||||
[]
|
||||
]);
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// Private APIs / Utility functions
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -474,7 +460,7 @@ global.splitLn = splitLn;
|
|||
global.addslashes = addslashes;
|
||||
global.AsyncFunction = AsyncFunction;
|
||||
|
||||
exports.VERSIONINFO = "Standard Library (std.js) version 0.7.4";
|
||||
exports.VERSIONINFO = "Standard Library (std.js) version 0.7.5";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
||||
|
||||
|
@ -482,4 +468,3 @@ exports.Event = StdEvent;
|
|||
exports.EventableObject = StdEventableObject;
|
||||
|
||||
exports.alert = alert;
|
||||
exports.cartesian = cartesian;
|
||||
|
|
Loading…
Reference in New Issue
Block a user