'use strict';12Object.defineProperty(exports, "__esModule", {3value: true4});56var _eachLimit = require('./eachLimit.js');78var _eachLimit2 = _interopRequireDefault(_eachLimit);910var _awaitify = require('./internal/awaitify.js');1112var _awaitify2 = _interopRequireDefault(_awaitify);1314function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }1516/**17* The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time.18*19* Note, that unlike [`each`]{@link module:Collections.each}, this function applies iteratee to each item20* in series and therefore the iteratee functions will complete in order.2122* @name eachSeries23* @static24* @memberOf module:Collections25* @method26* @see [async.each]{@link module:Collections.each}27* @alias forEachSeries28* @category Collection29* @param {Array|Iterable|AsyncIterable|Object} coll - A collection to iterate over.30* @param {AsyncFunction} iteratee - An async function to apply to each31* item in `coll`.32* The array index is not passed to the iteratee.33* If you need the index, use `eachOfSeries`.34* Invoked with (item, callback).35* @param {Function} [callback] - A callback which is called when all36* `iteratee` functions have finished, or an error occurs. Invoked with (err).37* @returns {Promise} a promise, if a callback is omitted38*/39function eachSeries(coll, iteratee, callback) {40return (0, _eachLimit2.default)(coll, 1, iteratee, callback);41}42exports.default = (0, _awaitify2.default)(eachSeries, 3);43module.exports = exports['default'];4445