snakecase-keys-object
Snakecase the keys of an object. Use for node.js and browser
It is useful for oracledb.
Installation
$ npm install --save snakecase-keys-object
or
$ yarn add snakecase-keys-object
Usage
Node.JS
const snakeKeys = ; const object = camelCase: 1 UPPERCASE: 2 lowercase: 3 snake_case: 4 PascalCase: 5 'Title Case': 6 'dot.case': 7 'param-case': 8 'Sentence case': 9 'path/case': 10 'Header-Case': 11; const res = ; console;/** { camel_case: 1, uppercase: 2, lowercase: 3, snake_case: 4, pascal_case: 5, title_case: 6, dot_case: 7, param_case: 8, sentence_case: 9, path_case: 10, header_case: 11 } */ console; // nullconsole; // null
Browser
1. NPM Package
<!-- Or use minified-->
2. Download from source
Usage
API
snakeKeys(object)
Returns a new object which keys is/are snakecased.