Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

21 Commits

Repository files navigation

then-queue

a simple asynchronous queue

Build StatusDependency StatusNPM version

Installation

npm install then-queue

API

new Queue()

varQueue=require('then-queue');varq=newQueue();

A fresh queue!

queue.push(item)

Push an item onto the queue

queue.pop() -> Promise Item

Pop an item from the queue

queue.length

Amount of items in the queue (note that this can be negative if pop has been called more times than push).

Events

The length-changed event gets emitted whenever pop or push has been called. You could use it to spawn/kill workers when the length changes.

About

a simple asynchronous queue

Resources

Security policy

Stars

17 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages