1.1.0 • Published 8 years ago

@rill/parallel v1.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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!

1.1.0

8 years ago

1.0.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago