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

Version Path
trusty-cms-6.3.1 node_modules/concat-map/index.js
immosquare-cleaner-0.1.51 node_modules/concat-map/index.js
boring_generators-0.15.0 tmp/templates/app_template/node_modules/concat-map/index.js
immosquare-cleaner-0.1.50 node_modules/concat-map/index.js
immosquare-cleaner-0.1.49 node_modules/concat-map/index.js
immosquare-cleaner-0.1.48 node_modules/concat-map/index.js
immosquare-cleaner-0.1.47 node_modules/concat-map/index.js
immosquare-cleaner-0.1.46 node_modules/concat-map/index.js
immosquare-cleaner-0.1.45 node_modules/concat-map/index.js
immosquare-cleaner-0.1.44 node_modules/concat-map/index.js
opal-1.8.3.rc1 stdlib/nodejs/node_modules/concat-map/index.js
boring_generators-0.14.0 tmp/templates/app_template/node_modules/concat-map/index.js
immosquare-cleaner-0.1.43 node_modules/concat-map/index.js
immosquare-cleaner-0.1.42 node_modules/concat-map/index.js
immosquare-cleaner-0.1.41 node_modules/concat-map/index.js
immosquare-cleaner-0.1.40 node_modules/concat-map/index.js
immosquare-cleaner-0.1.39 node_modules/concat-map/index.js
immosquare-cleaner-0.1.38 node_modules/concat-map/index.js
optimacms-0.1.61 spec/dummy/node_modules/concat-map/index.js
boring_generators-0.13.0 tmp/templates/app_template/node_modules/concat-map/index.js