batch
Advanced tools
Comparing version 0.0.1 to 0.0.2
0.0.2 / 2012-02-12 | ||
================== | ||
* any node | ||
0.0.1 / 2010-01-03 | ||
@@ -3,0 +8,0 @@ ================== |
{ | ||
"name": "batch" | ||
, "version": "0.0.1" | ||
, "version": "0.0.2" | ||
, "description": "Simple async batch" | ||
@@ -12,3 +12,3 @@ , "keywords": [] | ||
, "main": "index" | ||
, "engines": { "node": "0.4.x" } | ||
, "engines": { "node": "*" } | ||
} |
@@ -6,4 +6,27 @@ | ||
## License | ||
## Installation | ||
``` | ||
$ npm install batch | ||
``` | ||
## API | ||
```js | ||
var Batch = require('batch') | ||
, batch = new Batch; | ||
ids.forEach(function(id){ | ||
batch.push(function(done){ | ||
User.get(id, done); | ||
}); | ||
}); | ||
batch.end(function(err, users){ | ||
}); | ||
``` | ||
## License | ||
(The MIT License) | ||
@@ -10,0 +33,0 @@ |
4278
52