Compose middleware specifically for Koa.
$ npm install koa-compose
- Lead: @jonathanong @jongleberry
Compose the given middleware and return middleware.
MIT
koa-compose 涉及到的设计模式叫职责链模式~
https://github.com/reduxjs/redux/blob/master/src/compose.ts
有余力的小伙伴,也可以看看redux 的compose~根据测试用例看compose
我写过redux compose~ https://lxchuan12.gitee.io/redux/#_5-2-redux-compose-functions