Class: PromiseQueue

.data.PromiseQueue()

Class representing a promise queue. Credits: Markosyan. (2019, April 5). How to manage promises into dynamic queue with Vanilla JavaScript. Medium. https://medium.com/@karenmarkosyan/how-to-manage-promises-into-dynamic-queue-with-vanilla-javascript-9d0d1f8d4df5

Constructor

new PromiseQueue()

Create a queue.
Source:

Methods

_dequeue()

Remove and execute the next promise on the stack from the queue.
Source:
Returns:
true if successful else false.

enqueue(promise)

Add a function containing a promise to the queue.
Parameters:
Name Type Description
promise function Callback function that returns a promise.
Source:
Returns:
Promise that resolves the outcome of the input promise when it is dequeued.