middlewrap

0.3.0 • Public • Published

middlewrap

A utility for wrapping functions in stacks of middleware. A cut down version of hooks.

Usage

var stack = [function (next, a, b) { console.log(a, b); next() }, console.dir]

var f = function (a, b, cb) {
  if (a === b) return cb('yes');
  return cb('no');
};

f = wrap(f, stack);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.3.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.3.0
    0
  • 0.2.0
    0
  • 0.1.0
    1
  • 0.0.0
    1

Package Sidebar

Install

npm i middlewrap

Weekly Downloads

0

Version

0.3.0

License

BSD

Last publish

Collaborators

  • adamvr