Converts a given string to camelCase format.
The input string to convert.
The camelCase version of the input string, or an empty string if input is falsy.
toCamelCase('Hello world'); // "helloWorld"toCamelCase(' foo_bar-baz '); // "fooBarBaz"toCamelCase('XMLHttpRequest'); // "xmlHttpRequest"toCamelCase(undefined); // "" Copy
toCamelCase('Hello world'); // "helloWorld"toCamelCase(' foo_bar-baz '); // "fooBarBaz"toCamelCase('XMLHttpRequest'); // "xmlHttpRequest"toCamelCase(undefined); // ""
Converts a given string to camelCase format.