Sha256: 091b65d778337599d0140b35d53c038603d1732d27c33bfe39e03871a96926b2
Contents?: true
Size: 345 Bytes
Versions: 612
Compression:
Stored size: 345 Bytes
Contents
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]'; };
Version data entries
612 entries across 409 versions & 48 rubygems