|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
707 bytes
|
| Rev | Line | |
|---|
| [a762898] | 1 | /**
|
|---|
| 2 | * Converts a string to Pascal case.
|
|---|
| 3 | *
|
|---|
| 4 | * Pascal case is the naming convention in which each word is capitalized and concatenated without any separator characters.
|
|---|
| 5 | *
|
|---|
| 6 | * @param {string} str - The string that is to be changed to pascal case.
|
|---|
| 7 | * @returns {string} - The converted string to Pascal case.
|
|---|
| 8 | *
|
|---|
| 9 | * @example
|
|---|
| 10 | * const convertedStr1 = pascalCase('pascalCase') // returns 'PascalCase'
|
|---|
| 11 | * const convertedStr2 = pascalCase('some whitespace') // returns 'SomeWhitespace'
|
|---|
| 12 | * const convertedStr3 = pascalCase('hyphen-text') // returns 'HyphenText'
|
|---|
| 13 | * const convertedStr4 = pascalCase('HTTPRequest') // returns 'HttpRequest'
|
|---|
| 14 | */
|
|---|
| 15 | declare function pascalCase(str: string): string;
|
|---|
| 16 |
|
|---|
| 17 | export { pascalCase };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.