🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

sb-promise-queue

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sb-promise-queue

Promise queue with a nice API

2.1.1
latest
Source
npm
Version published
Weekly downloads
211K
-0.21%
Maintainers
1
Weekly downloads
 
Created
Source

Promise-Queue

Promise queue with a nice API.

Installation

npm install --save sb-promise-queue

API

interface Options {
  concurrency?: number
}

class PromiseQueue {
  constructor(options: Options = {concurrency: 1});

  clear()
  onIdle(callback: Function): Function
  // call the return value function to remove listener
  waitTillIdle(): Promise<void>
  add(callback: Function)
}

export { PromiseQueue }

License

The contents of this repository/package are licensed under the terms of The MIT License. See the LICENSE file for more info.

Keywords

Promise

FAQs

Package last updated on 06 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts