chunk-requester

1.1.0 • Public • Published

Hmmm but how do I use this ?


import Foo from 'chunk-requester';
 
const arrayOfFunctionsThatReturnAPromise = [() => Promise.resolve(1), () => Promise.resolve(2)];
const chunkSize = 3;
 
const onEachChunkResolve = (resolvedValue) => {
  console.log(resolvedValue);
}
 
const onAllChunksResolved = (allValuesInAnArray) => {
  console.log(allValuesInAnArray);
}
 
Foo(
  arrayOfFunctionsThatReturnAPromise,
  chunkSize,
  onEachChunkResolve
).then(onAllChunksResolved)

oh well ...easy enough

Readme

Keywords

Package Sidebar

Install

npm i chunk-requester

Weekly Downloads

4

Version

1.1.0

License

ISC

Unpacked Size

1.51 kB

Total Files

3

Last publish

Collaborators

  • joelbandi