loopNext
Run loops with async statements in a sync fashion. Did I tell you about nested sync loops? ;)
To use
- Install it:
```bash
$ npm i loopnext
```
- Require it and use:
```js
var LoopNext = require('loopnext');
var loop = new LoopNext();
loop.syncLoop(iterations, function (l) {
// loop body
// call `l.next()` for next iteration
});
```
Example
var LoopNext = ; var loop = ;var count = 0;loop;// 0// 1// 2// 3
License
MIT © 2015 Sunny (darkowlzz)