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.

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i dopar

    Weekly Downloads

    0

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    5.33 kB

    Total Files

    6

    Last publish

    Collaborators

    • honzabrecka