Sha256: e5a9bf63cf9e9a81525ee2ae015bed8d66e081c4fceceb60d1791fdcf38a1b14

Contents?: true

Size: 789 Bytes

Versions: 47

Compression:

Stored size: 789 Bytes

Contents

"use strict";
module.exports = function(Promise, INTERNAL) {
var PromiseReduce = Promise.reduce;
var PromiseAll = Promise.all;

function promiseAllThis() {
    return PromiseAll(this);
}

function PromiseMapSeries(promises, fn) {
    return PromiseReduce(promises, fn, INTERNAL, INTERNAL);
}

Promise.prototype.each = function (fn) {
    return PromiseReduce(this, fn, INTERNAL, 0)
              ._then(promiseAllThis, undefined, undefined, this, undefined);
};

Promise.prototype.mapSeries = function (fn) {
    return PromiseReduce(this, fn, INTERNAL, INTERNAL);
};

Promise.each = function (promises, fn) {
    return PromiseReduce(promises, fn, INTERNAL, 0)
              ._then(promiseAllThis, undefined, undefined, promises, undefined);
};

Promise.mapSeries = PromiseMapSeries;
};

Version data entries

47 entries across 43 versions & 15 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/bluebird/js/release/each.js
disco_app-0.18.0 test/dummy/node_modules/bluebird/js/release/each.js
disco_app-0.18.2 test/dummy/node_modules/bluebird/js/release/each.js
disco_app-0.16.1 test/dummy/node_modules/bluebird/js/release/each.js
disco_app-0.15.2 test/dummy/node_modules/bluebird/js/release/each.js
disco_app-0.18.4 test/dummy/node_modules/bluebird/js/release/each.js
disco_app-0.18.1 test/dummy/node_modules/bluebird/js/release/each.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/bluebird/js/release/each.js
disco_app-0.14.0 test/dummy/node_modules/bluebird/js/release/each.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/bluebird/js/release/each.js
tang-0.2.1 spec/tang_app/node_modules/bluebird/js/release/each.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/bluebird/js/release/each.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/bluebird/js/release/each.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/bluebird/js/release/each.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/bluebird/js/release/each.js
tang-0.2.0 spec/tang_app/node_modules/bluebird/js/release/each.js
tang-0.1.0 spec/tang_app/node_modules/bluebird/js/release/each.js
tang-0.0.9 spec/tang_app/node_modules/bluebird/js/release/each.js
enju_library-0.3.8 spec/dummy/node_modules/bluebird/js/release/each.js
ilog-0.4.1 node_modules/consolidate/node_modules/bluebird/js/release/each.js