p-limit
Control how many asynchronous jobs run at once.
sindresorhus · Code and testing
GitHub projectOpen source Open on GitHubHow to try it
Run three short tasks with a two-task limit.
What we tested
3.1.0. All three tasks finished and observed concurrency stayed at two.