Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/honzabrecka/dopar
It runs many promises in parallel.
https://github.com/honzabrecka/dopar
es6 javascript parallel promise
Last synced: about 1 month ago
JSON representation
It runs many promises in parallel.
- Host: GitHub
- URL: https://github.com/honzabrecka/dopar
- Owner: honzabrecka
- License: mit
- Created: 2019-05-10T14:43:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T21:43:26.000Z (almost 2 years ago)
- Last Synced: 2024-08-11T08:52:05.564Z (3 months ago)
- Topics: es6, javascript, parallel, promise
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/dopar
- Size: 812 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dopar
> It runs many promises in parallel.
## Installation
```console
yarn install dopar
```## Usage
```javascript
import dopar from 'dopar'const lazyPromises = [
() => oneSecondDelay(),
() => oneSecondDelay(),
() => oneSecondDelay(),
]dopar(3, lazyPromises) // resolves after +-1 second instead of 3 seconds
dopar.forEach(3, lazyPromises) // resolves after +-1 second instead of 3 seconds
```The difference between `dopar` and `dopar.forEach` is that the latter does not store any result in memory.