Simple async queue in javascript
This post was originally published on Coding Glamour.
Normally I fall back to caolan's async module, but I'm not in
a node.js environment and I needed a simple async queue with concurrency
1; which can be done in a one liner.
You could use arguments.callee rather than queue to bind to the current
function, but it has been deprecated since ES5.
It's also easy to use it with promises, let's say I have a function
|sendKey| that returns a promise and I want to send a string char by char:
There are 2 comments on this article, read them on Coding Glamour.