Execute async callbacks in the correct orders.
There is only one function from the default import
import makeQueue from 'make-queue'
// or
const makeQueue = require('make-queue')
const queue = makeQueue(skipError)
: create a new queuequeue
. Default:skipError = true
.queue(cb)
: appends thecb
callback to the queue and returns a promise which resolves thecb
's results.
If skipError
is false, once a callback in a chain throws an error, all following calls fail immediately and throw this error.