js-middleware
js-middleware copied to clipboard
Apply to all functions
Added functionality so that if you pass null as the first parameter tomiddlewaremanager.use it will apply the middleware to all functions in the given object.
@unbug any chance this can be reviewed and merged?
Sorry @davearata-snorack , I prefer not to take advantage of the params. I suggest you could do :
Object.getOwnPropertyNames(Person.prototype).forEach(method => {
if(method !== 'constructor') {
middlewareManager.use(method, logger);
}
});