Newer
Older
CVSS_3.0_GUI / dist / CVSS_3.0_Calc-1.0.0-linux-x64 / node_modules / nwjs-builder-phoenix / node_modules / dir-compare / node_modules / minimatch / node_modules / brace-expansion / node_modules / concat-map / index.js
root on 7 May 2019 345 bytes Initial commit
  1. module.exports = function (xs, fn) {
  2. var res = [];
  3. for (var i = 0; i < xs.length; i++) {
  4. var x = fn(xs[i], i);
  5. if (isArray(x)) res.push.apply(res, x);
  6. else res.push(x);
  7. }
  8. return res;
  9. };
  10.  
  11. var isArray = Array.isArray || function (xs) {
  12. return Object.prototype.toString.call(xs) === '[object Array]';
  13. };
Buy Me A Coffee