0.3.4 • Published 10 months ago

work-faster v0.3.4

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Work Faster

install

npm install work-faster

usage

forEachAsync works in the same way as forEach, but asynchronously. Example:

	require('work-faster');

	let list = [1,1,2,3,5];

	list.forEach(item => {
		doStuff(item)
	})

	await list.forEachAsync(async item => {
		await doStuffAsync(item)
	})

This will run as many callbacks in parallel as there are CPU cores. You can set a different value for maxParallel an optional second parameter:

	await list.forEachAsync(doStuff, 4);
0.3.2

10 months ago

0.3.4

10 months ago

0.3.3

10 months ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago