npm.io
1.0.0 • Published 6 years ago

scalable-promise-all

Licence
ISC
Version
1.0.0
Deps
0
Size
2 kB
Vulns
0
Weekly
0

scalable-promise-all

Mutable version of the Promise.all. You can mutate the provided array on the fly using this package. Use push, pop, shift or splice to mutate array of Promises.

Installing

Using npm:

$ npm install scalable-promise-all

Using yarn:

$ yarn add scalable-promise-all

Example

import scalablePromiseAll from "scalable-promise-all";

const foo = async () => {
  await scalablePromiseAll(someArray);

  // Some code mutating someArray.
  // scalablePromiseAll function will wait for the end of all promises.
};

foo();

License

ISC

Keywords