npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

concurrent-manager

v1.1.0

Published

A simple and fast way to manage concurrent promise tasks with Queue Data Structure.

Readme

Concurrent Manager

npm npm GitHub issues

A simple and fast way to manage concurrent promise tasks with Queue Data Structure.

Table of Contents

Why should I use it?

Sometimes you have to do any large concurrent processing using a Promise list and you don't want to Promise.all then because it will load all the promises into memory and will stop when any error occur. This package can help you with that! You can run concurrent promise by queuing it and set if it can continue processing even if any error occur. It has zero external dependencies.

Installation

npm i concurrent-manager

Usage

Creating Instance

import ConcurrentManager from 'concurrent-manager';

const concurrent = new ConcurrentManager({
  concurrent: 10, // max concurrent process to be run
  withMillis: true // add millisecond tracing to process
});

Queueing Process

concurrent.queue(() => {
  return doSomethingPromiseRequest();
});

// or
concurrent.queue(async() => {
  const response = await doSomethingPromiseRequest();
  return response;
});

// Run all queued process
console.log(concurrent.getListedProcess());
concurrent.run()
  .then(() => {
    // You can access that fulfilled & rejected are here
    console.log(concurrent.getListedProcess());
  });

But, you can run it independently too!

const processId = concurrent.queue(() => {
  return doSomethingPromiseRequest();
});

concurrent.getProcess(processId)
  .run()
  .then((response) => {
    console.log('Response ==>', response);
  });

You can alse re-trying run promise if that has rejected.

async function main() {
  concurrent.queue(() => {
    return doSomethingPromiseRequest();
  });

  // or
  concurrent.queue(async() => {
    const response = await doSomethingPromiseRequest();
    return response;
  });

  // Run all queued promises
  await concurrent.run()

  const rejected = concurrent.getProcess('rejected');

  concurrent.getListedProcess('rejected')
    .forEach((process) => process.run());
}

Publishing

  • Before pushing your changes to Github, make sure that version in package.json is changed to newest version. Then run npm install for synchronize it to package-lock.json
  • After your changes have been merged on branch main, you can publish the packages by creating new Relase here: https://github.com/gadingnst/concurrent-manager/releases/new
  • Create new tag, make sure the tag name is same as the version in package.json.
  • You can write Release title and notes here. Or you can use auto-generated release title and notes.
  • Click Publish Release button, then wait the package to be published.

License

concurrent-manager is freely distributable under the terms of the MIT license.

Feedbacks and Issues

Feel free to open issues if you found any feedback or issues on concurrent-manager. And feel free if you want to contribute too! 😄


Built with ❤️ by Sutan Gading Fadhillah Nasution on 2022