dopar

1.1.0 • Public • Published

dopar

 It runs many promises in parallel.

Installation

yarn install dopar

Usage

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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.01latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.01
1.0.00

Package Sidebar

Install

npm i dopar

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

5.33 kB

Total Files

6

Last publish

Collaborators

  • honzabrecka