express-pascal-to-camelcase
Express middleware to convert keys in request body from PascalCase (UpperCamelCase) to lowerCamelCase
Installation
$ npm install express-pascal-to-camelcase --save
Usage
const app = ;const bodyParser = ;const pascalToCamel = ; app;app; // add the middleware AFTER body-parser /* Converts request body{ SimpleValue: 45, InnerObject: { Pascal: 'case', UndefinedValue: undefined, Arr: [1, null, { DeepInside: 'Value' }] }} to{ simpleValue: 45, innerObject: { pascal: 'case', undefinedValue: undefined, arr: [1, null, { deepInside: 'Value' }] }} */
License
MIT