LendAndRegret/node_modules/es-toolkit/dist/compat/string/camelCase.d.mts
2026-05-02 17:27:43 +08:00

19 lines
773 B
TypeScript

/**
* Converts a string to camel case.
*
* Camel case is the naming convention in which the first word is written in lowercase and
* each subsequent word begins with a capital letter, concatenated without any separator characters.
*
* @param {string | object} str - The string that is to be changed to camel case.
* @returns {string} - The converted string to camel case.
*
* @example
* const convertedStr1 = camelCase('camelCase') // returns 'camelCase'
* const convertedStr2 = camelCase('some whitespace') // returns 'someWhitespace'
* const convertedStr3 = camelCase('hyphen-text') // returns 'hyphenText'
* const convertedStr4 = camelCase('HTTPRequest') // returns 'httpRequest'
*/
declare function camelCase(str?: string): string;
export { camelCase };