|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
773 bytes
|
| Line | |
|---|
| 1 | /**
|
|---|
| 2 | * Converts a string to camel case.
|
|---|
| 3 | *
|
|---|
| 4 | * Camel case is the naming convention in which the first word is written in lowercase and
|
|---|
| 5 | * each subsequent word begins with a capital letter, concatenated without any separator characters.
|
|---|
| 6 | *
|
|---|
| 7 | * @param {string | object} str - The string that is to be changed to camel case.
|
|---|
| 8 | * @returns {string} - The converted string to camel case.
|
|---|
| 9 | *
|
|---|
| 10 | * @example
|
|---|
| 11 | * const convertedStr1 = camelCase('camelCase') // returns 'camelCase'
|
|---|
| 12 | * const convertedStr2 = camelCase('some whitespace') // returns 'someWhitespace'
|
|---|
| 13 | * const convertedStr3 = camelCase('hyphen-text') // returns 'hyphenText'
|
|---|
| 14 | * const convertedStr4 = camelCase('HTTPRequest') // returns 'httpRequest'
|
|---|
| 15 | */
|
|---|
| 16 | declare function camelCase(str?: string): string;
|
|---|
| 17 |
|
|---|
| 18 | export { camelCase };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.