Skip to content

fibjs-modules/compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@fibjs/compose

NPM version build status appveyor build status Test coverage David deps Known Vulnerabilities npm download

Compose middleware.

Install

$ npm i @fibjs/compose --save

Usage

const compose = require('@fibjs/compose');

const middleware = [
  (ctx, next) => {
    next();
  },
  (ctx, next) => {
    next();
  },
];

const fn = compose(middleware);
const ctx = {
  num: 1,
};

fn(ctx)(ctx, (ctx) => {});

Questions & Suggestions

Please open an issue here.

License

MIT

Releases

No releases published

Packages

No packages published