Skip to content

rill-js/parallel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rill
@rill/parallel
API stability Standard NPM version Downloads Gitter Chat

Simple utility to run standard Rill middleware in parallel.

Installation

npm install @rill/parallel

Example

// Run both timeouts in parallel.
app.use(parallel([
	(ctx, next)=> next().then(sleep(1000)),
	(ctx, next)=> sleep(1000).then(next)
]))

function sleep (ms) {
	return new Promise((accept)=> setTimeout(accept, ms))
}

Contributions

  • Use npm test to run tests.

Please feel free to create a PR!

About

🎶 Run Rill middleware in parallel.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published