_each.js 272 B

123456789101112
  1. 'use strict';
  2. var _map = require('./_map');
  3. module.exports = function each (concurrency) {
  4. return _map(concurrency, then);
  5. function then (collection, done) {
  6. return function mask (err) {
  7. done(err); // only return the error, no more arguments
  8. };
  9. }
  10. };