I would like to have a middleware function which modifies the response body.
This is for an express server.
Something like:
function modify(
express-mung is designed for this. Instead of events its just more middleware. Your example would look something like
const mung = require('express-mung') module.exports = mung.json(body => body.modifiedBy = 'me');