koajs / discussions

KoaJS Discussions
2 stars 2 forks source link

Standard/recommended way to identify Koa application objects #17

Open jbemmel opened 4 years ago

jbemmel commented 4 years ago

Middleware like koa-mount has a need to identify Koa application objects, and behave differently if found ( example ).

What would be the standard/recommended way to achieve this? Perhaps by using an exported Symbol in a sub package?

jonathanong commented 4 years ago

Middleware like koa-mount has a need to identify Koa application objects

not sure this is ever actually necessary in real life. i would just export an array of middleware instead.