/** * Map over the given collection asynchronously, gating so that * only `concurrency` number predicates are running at once. Resolves with * an array containing the results in order of the collection. * * @param {Collection} collection * @param {Predicate} predicate * @param {Object} [options] * @param {number} [options.concurrency=Infinity] * * @returns {Promise} * @category Promises */ export default function pmap(collection: Collection, predicate: Predicate, { concurrency }?: { concurrency?: number; }): Promise;