make-queue

Execute async callbacks in the correct orders

Usage no npm install needed!

<script type="module">
  import makeQueue from 'https://cdn.skypack.dev/make-queue';
</script>

README

Execution queue Build Status

NPM

Execute async callbacks in the right orders.

API reference

There is only one function from default import

import makeQueue from 'make-queue'
  • const queue = makeQueue(skipError): create a new queue queue. Default: skipError = true.
  • queue(cb): appends the cb callback to the queue and returns a promise which resolves the cb's results.

If skipError is false, once a callback in a chain throws an error, all following calls fail immediately and throw this error.