@konper/easy-pool
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

Easy Pool

Create pool to limit the preemption of resource.

Install

npm

npm install @konper/easy-pool

yarn

yarn add @konper/easy-pool

Usage

const foo = (cb) => {
  // touch resource here
  // ...
  // done
  cb()
}

const pool = new Pool([size = 5])
pool.push(foo)

Event

pool.on(event, callback)
  • done: triggered when size became 0.

Readme

Keywords

none

Package Sidebar

Install

npm i @konper/easy-pool

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

4.79 kB

Total Files

6

Last publish

Collaborators

  • konper