Skip to content

Version 2

Latest
Compare
Choose a tag to compare
@dsblv dsblv released this 21 Feb 21:54
· 3 commits to master since this release

Aaaand... After three months I realized it can be done better. So here's queue-up the sequel.

Before you had to:

queue.up().then(doStuff);

And now:

queue.up(doStuff);

Breaking changes

  • Removed support of third-party Promise implementations.
  • queue.up() now accepts function instead of value.
  • Next function is being invoked in interval after when previous resolves (it was just interval between invocations before).
  • All promises are chained. This means if function in the middle throws/rejects, ones that came after it won't ever be invoked.

New features

New cool feature is the queue.all() method. It allows to enqueue several functions at once, and then get all the results as an array.

🎉 Have fun!