From e703e51c9c09b22e3bcda9a1faf1e05897f60616 Mon Sep 17 00:00:00 2001 From: Minteck Date: Tue, 21 Dec 2021 15:25:09 +0100 Subject: Initial commit --- _mint/node_modules/concat-map/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 _mint/node_modules/concat-map/index.js (limited to '_mint/node_modules/concat-map/index.js') diff --git a/_mint/node_modules/concat-map/index.js b/_mint/node_modules/concat-map/index.js new file mode 100644 index 0000000..b29a781 --- /dev/null +++ b/_mint/node_modules/concat-map/index.js @@ -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]'; +}; -- cgit