dong-queue

0.1.1 • Public • Published

dong-queue

NPM version Build Status

simple (a)sync queue runner

Install

npm install --save dong-queue

Usage

run

synchronous. run queue member step by step (one invokes by previous one with next).

var queue = new Queue()
 
// use function
queue.use(function([arg1, arg2, ...], next){
  // do some (a)sync job, then
  next()
})
 
// use functions
queue.use([function([arg1, arg2, ...], next){
  // do some (a)sync job, then
  next()
}, ...])
 
// dynamically pass arguments to queue members
queue.run([arg1, arg2, ... ], [function callback([arg1, arg2, ... ]) {
  // do some callbacks
}])

any

asynchronous. if any member of the queue is finished, call the callback.

all

asynchronous. if all members of the queue is finished, call the callback.

Readme

Keywords

Package Sidebar

Install

npm i dong-queue

Weekly Downloads

3

Version

0.1.1

License

none

Last publish

Collaborators

  • imliwenfu