3.3.16 • Published 5 months ago

maximize-iterator v3.3.16

Weekly downloads
16
License
MIT
Repository
github
Last release
5 months ago

maximize-iterator

Maximize the parallel calls of an iterator supporting asyncIterator interface.

const maximize = require('maximize-iterator');

(async ()=> {
  // run 1024 in parallel until done - promises
  var iterator = // create it somehow with a next method returing {done: value: }
  await maximize(iterator, (value) => { /* do something including false stop */ }, { concurrency: 1024, limit: Infinity, error: (err) => { return true; /* filter errors */ } });
})();

// run 1024 in parallel until done - callbacks
var iterator = // create it somehow with a next method returing {done: value: }
maximize(iterator, (value) => { /* do something including false stop */ }, { concurrency: 1024, limit: Infinity,  error: (err) => { return true; /* filter errors */ } }, (err) => {
  /* done */
});

forEach Options:

  • bool: callbacks - use an each function with a callback function(entry, callback) (default: false)
  • number: concurrency - parallelism of processing. (default: Infinity)
  • number: limit - maximum number to process. (default: Infinity)
  • number: batch - per batch count to limit expansion. (default: 10)
3.3.13

5 months ago

3.3.14

5 months ago

3.3.15

5 months ago

3.3.16

5 months ago

3.3.10

5 months ago

3.3.11

5 months ago

3.3.12

5 months ago

3.3.9

5 months ago

3.3.8

5 months ago

3.3.7

5 months ago

3.3.6

5 months ago

3.3.1

5 months ago

3.3.0

5 months ago

3.2.1

6 months ago

3.3.5

5 months ago

3.3.4

5 months ago

3.3.2

5 months ago

3.2.0

1 year ago

3.1.0

1 year ago

3.0.0

1 year ago

2.6.6

3 years ago

2.6.5

5 years ago

2.6.4

5 years ago

2.6.2

5 years ago

2.6.1

5 years ago

2.6.0

5 years ago

2.5.0

5 years ago

2.5.1

5 years ago

2.4.0

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago