1.0.1 • Published 8 years ago
asynchronous-loop v1.0.1
async-loop
Adds asynchronous version of javascript loop
functionality to caolan/async.
Installation
npm install wiggzz/async-loop
Usage
var asyncLoop = require('async-loop');
var count = 0;
asyncLoop(function(_break,_continue) {
if(++count > 2) {
_break();
} else {
_continue();
}
}, function() {
console.log('Looped ' + count + ' times.');
});
// output:
// Looped 3 times.
1.0.1
8 years ago