0.1.2 • Published 7 years ago

queuepro v0.1.2

Weekly downloads
6
License
ISC
Repository
github
Last release
7 years ago

QueuePro

Execute a function queue to receive value passed in resolving of the last call function.

You can override the default Promise or use a unique variable for this module. In any of the options you will have all the other standard Promise methods available.

Use

var queue = require("queuepro")

var func = queue([
    new Promise((resolve, reject) => { resolve(1) }),
    data => new Promise((resolve, reject) => { 
        setTimeout(() => {
            resolve(--data)
        }, 3000) 
    }),
    data => new Promise((resolve, reject) => { resolve(++data) }),
])

func.then(data => console.log(data), err => console.error(err))
0.1.2

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago