CamelCase JS
String to CamelCase or CamelCase to string:
foo-bar
⇄fooBar
Install
$ npm install --save camelcasejs
Methods
- CamelCase
- Convert string/array to CamelCase format
- DeCamelize
- Convert CamelCase format to string
Examples
CamelCase
// Importconst CamelCase = ; ;// Response = 'fooBar' ;// Response = 'fooBar' ;// Response = 'fooBar' ;// Response = 'fooBar' ;// Response = 'fooBar' ;// Response = 'fooBar'
Array
// Importconst CamelCase = ; ;// Response = 'fooBar'
DeCamelize
// Importconst DeCamelize = ; ;// Response = 'foo_bar' ;// Response = 'foo_bar_v9.2' /* Custom separator */;// Response = 'foo=bar' ;// Response = 'foo-bar-v9.2'
License
MIT © Julio Sansossio