|
Last change
on this file since ba17441 was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
696 bytes
|
| Line | |
|---|
| 1 | /**
|
|---|
| 2 | * Converts a string to kebab case.
|
|---|
| 3 | *
|
|---|
| 4 | * Kebab case is the naming convention in which each word is written in lowercase and separated by a dash (-) character.
|
|---|
| 5 | *
|
|---|
| 6 | * @param {string} str - The string that is to be changed to kebab case.
|
|---|
| 7 | * @returns {string} - The converted string to kebab case.
|
|---|
| 8 | *
|
|---|
| 9 | * @example
|
|---|
| 10 | * const convertedStr1 = kebabCase('camelCase') // returns 'camel-case'
|
|---|
| 11 | * const convertedStr2 = kebabCase('some whitespace') // returns 'some-whitespace'
|
|---|
| 12 | * const convertedStr3 = kebabCase('hyphen-text') // returns 'hyphen-text'
|
|---|
| 13 | * const convertedStr4 = kebabCase('HTTPRequest') // returns 'http-request'
|
|---|
| 14 | */
|
|---|
| 15 | declare function kebabCase(str: string): string;
|
|---|
| 16 |
|
|---|
| 17 | export { kebabCase };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.