each.js 298 B

12345678910111213
  1. "use strict";
  2. module.exports = function(Promise, INTERNAL) {
  3. var PromiseReduce = Promise.reduce;
  4. Promise.prototype.each = function (fn) {
  5. return PromiseReduce(this, fn, null, INTERNAL);
  6. };
  7. Promise.each = function (promises, fn) {
  8. return PromiseReduce(promises, fn, null, INTERNAL);
  9. };
  10. };