@rill/parallel

1.1.0 • Public • Published

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!

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.0
    1
  • 1.0.0
    1
  • 0.1.1
    1
  • 0.1.0
    1

Package Sidebar

Install

npm i @rill/parallel

Weekly Downloads

4

Version

1.1.0

License

MIT

Last publish

Collaborators

  • dylanpiercey