Skip to content

Astrocoders/waterfall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Waterfall

This function receives an array of promises and resolves all them one by one when the execution of this function finish all promises passed will be resolved. This is more performatic than Promise.all when you need to await a big array of promises.

Install

yarn add @astrocoders/waterfall

Usage

import waterfall from '@astrocoders/waterfall'

const result = await waterfall(
	list.map(item => async () => {
		return new Promise((resolve, reject) => resolve(item * 2))
	}
)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published