1.0.2 • Published 3 years ago

async-iterator-concurrent-map v1.0.2

Weekly downloads
10
License
MIT
Repository
-
Last release
3 years ago

async-iterator-concurrent-map

Install

npm install async-iterator-concurrent-map
yarn add async-iterator-concurrent-map

Usage

import { mapConcurrent } from 'async-iterator-concurrent-map';

const concurrentIterator = mapConcurrent(someAsyncGenerator, 10, async (value) => {
  const result = await someIO(value); // Up to 10 of these will run concurrently
  return result;
});

for await (const value of concurrentIterator) {
  // ...
}
1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago