You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since box can emit unlimited amount of messages, a plain Koa-like middleware won't cut it. We can use generators though and yield to the middleware. The user-level API may look like this:
functionmyFancyMiddleware(ctx,next){// do something before the box is calledfor(letmessageofnext()){// do something with message// pass the message up the middleware chainyieldmessage}// do something once the box is done}
This could be used to implement: #39, #25, #44.
The text was updated successfully, but these errors were encountered: