Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

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);

install

npm i middlewrap

Downloadsweekly downloads

14

version

0.3.0

license

BSD

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar