toCamelCase
Using
Сonverts a string into camelCase
format.
Demo - use JSON
toCamelCase( )
"anyString"
Arguments
Argument | Type | Description | Example |
---|---|---|---|
str | string | String | "iAmString" "Text_TEXT" |
Returns
string
| undefined
— String in the format camelCase
or undefined
if str
was not a string
Examples
toCamelCase('some value');
// "someValue"
toCamelCase('ANY_STRING');
// "anyString"
toCamelCase('iLikeShegit');
// "iLikeShegit"
toCamelCase();
// undefined
toCamelCase(55);
// undefined