2 const pTry = require('p-try');
4 module.exports = concurrency => {
6 throw new TypeError('Expected `concurrency` to be a number from 1 and up');
15 if (queue.length > 0) {
20 return fn => new Promise((resolve, reject) => {
36 if (activeCount < concurrency) {