express-camelcase-response-keys
v1.0.1
Published
Express middleware for converting response json to camelCase
Downloads
24
Readme
Express camelCase response keys
Tiny Express middleware to convert JSON-response data into camelcase notation.
Response before middleware:
{ "some_field": "blabla" }
Response after middleware:
{ "someField": "blablabla" }
Installation
npm install express-camelcase-response-keys
Usage
See camelcase-keys for configuration options.
app.use(require('express-camelcase-response-keys')(/* options here */));
Example
const camelcaseMiddleware = require('express-camelcase-response-keys');
app.use(camelcaseMiddleware({
deep: true
}));