Skip to content

fundon/composedly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

composedly Build Status

Create compositions of middleware and named it.

Note: When you create compositions of middleware using koa-compose
or composition, it just returns an anonymous GeneratorFunction.
And if you want to enable DEBUG model in Koa, nothing is displayed.

Usage

var compose = require('composedly')

function* bar(next) {
  yield* next
}
function* foo() {
  return this
}

var fn = compose('composedly', bar, foo);
// Now, `fn.name` is 'composedly'

co(function* () {
  yield* fn.call(true);
})();

API

composedly(name, fn...)

  • name - String
  • fn - GeneratorFunction

Dependencies

License

MIT

About

Named composed middleware.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published