creating project

This commit is contained in:
pouyan mehdibeik
2026-04-21 12:39:54 +03:30
parent 0e62fa703c
commit 91aea4840e
4575 changed files with 1053788 additions and 2 deletions
+13
View File
@@ -0,0 +1,13 @@
module.exports = function (xs, fn) {
var res = [];
for (var i = 0; i < xs.length; i++) {
var x = fn(xs[i], i);
if (isArray(x)) res.push.apply(res, x);
else res.push(x);
}
return res;
};
var isArray = Array.isArray || function (xs) {
return Object.prototype.toString.call(xs) === '[object Array]';
};