3.3.16 • Published 9 months ago

maximize-iterator v3.3.16

Weekly downloads
16
License
MIT
Repository
github
Last release
9 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

9 months ago

3.3.14

9 months ago

3.3.15

9 months ago

3.3.16

9 months ago

3.3.10

9 months ago

3.3.11

9 months ago

3.3.12

9 months ago

3.3.9

9 months ago

3.3.8

9 months ago

3.3.7

10 months ago

3.3.6

10 months ago

3.3.1

10 months ago

3.3.0

10 months ago

3.2.1

10 months ago

3.3.5

10 months ago

3.3.4

10 months ago

3.3.2

10 months ago

3.2.0

2 years ago

3.1.0

2 years ago

3.0.0

2 years 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

6 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago