PHP 7.4.33
Preview: Readme.md Size: 731 B
/var/www/coop-podio-sms.bitkit.dk/httpdocs/node_modules/batch/Readme.md
# batch

  Simple async batch with concurrency control and progress reporting.

## Installation

```
$ npm install batch
```

## API

```js
var Batch = require('batch')
  , batch = new Batch;

batch.concurrency(4);

ids.forEach(function(id){
  batch.push(function(done){
    User.get(id, done);
  });
});

batch.on('progress', function(e){

});

batch.end(function(err, users){

});
```

### Progress events

  Contain the "job" index, response value, duration information, and completion data.

```
{ index: 1,
  value: 'bar',
  pending: 2,
  total: 3,
  complete: 2,
  percent: 66,
  start: Thu Oct 04 2012 12:25:53 GMT-0700 (PDT),
  end: Thu Oct 04 2012 12:25:53 GMT-0700 (PDT),
  duration: 0 }
```

## License

[MIT](LICENSE)

Directory Contents

Dirs: 0 × Files: 8
Name Size Perms Modified Actions
29 B lrw-r--r-- 2017-03-25 17:42:27
Edit Download
299 B lrw-r--r-- 2017-05-16 21:10:23
Edit Download
1.62 KB lrw-r--r-- 2017-05-16 21:10:42
Edit Download
2.87 KB lrw-r--r-- 2017-05-16 21:05:16
Edit Download
1.07 KB lrw-r--r-- 2017-03-25 18:57:09
Edit Download
69 B lrw-r--r-- 2017-03-25 17:42:27
Edit Download
1.36 KB lrw-r--r-- 2024-05-28 16:34:58
Edit Download
731 B lrw-r--r-- 2017-05-16 21:09:40
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).