Changes the case of all object's keys,Array,String
npm install change-case-object
Currently, only CommonJS environments are supported. (This means Node.js and browser with browserify
or webpack
)
var changeCaseObject = require('change-case-object');
var myObject = {
hello_world: 'hi',
};
var newObject = changeCaseObject.camelCase(myObject);
// {helloWorld: 'hi'}
All methods are available under the changeCaseObject
object after the module has been required.
Conerts all object keys into camel case.
hello_world -> helloWorld
Conerts all object keys into snake case.
helloWorld -> hello_world
Conerts all object keys into param case.
helloWorld -> hello-world
Shorthand methods are also available:
.camelCase -> .camel
.snakeCase -> .snake
.paramCase -> .param
AirBnB ES5
MIT