1.0.0 • Published 9 years ago

afor v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

afor

Simple npm module to make async iterators in Node.js

Installation

npm install afor --save

Usage

var afor = require('afor');

afor(0, 10000000, function(i) {
  console.log('I: ' + i);
});

// You can also add a done fuction.
afor(0, 10000000, function(i) {
  console.log('I: ' + i);
}, function() {
  console.log('The End!');
});

Why an async iterator?

Try this code in your Node.js console and check it yourself:

for (var i = 0; i < 10000000; i++) {
  console.log('I: ', i);
}
1.0.0

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago