Tiny Express middleware to convert JSON-response data into camelcase notation.
Response before middleware:
{ "some_field": "blabla" }
Response after middleware:
{ "someField": "blablabla" }
npm install express-camelcase-response-keys
See camelcase-keys for configuration options.
app.use(require('express-camelcase-response-keys')(/* options here */));
const camelcaseMiddleware = require('express-camelcase-response-keys');
app.use(camelcaseMiddleware({
deep: true
}));