Skip to content

Instantly share code, notes, and snippets.

View Stupidism's full-sized avatar

Feng Sun Stupidism

View GitHub Profile
@Stupidism
Stupidism / proposal.md
Last active June 19, 2017 21:07
express-like decorators

My Proposal

We can imitate how express handle middlewares. Extend current api:

middleware-style params

addDecorator((getStory[, next, context]) => {...})

globally

const inspectDecorator = (getStory) => {