format
This commit is contained in:
@@ -2,9 +2,12 @@
|
||||
* Capitalizes the first letter of each word in a string.
|
||||
*/
|
||||
export function capitalizeSentence(string: string): string {
|
||||
return string.split(' ').map(word => {
|
||||
return word.charAt(0).toUpperCase() + word.slice(1);
|
||||
}).join(' ');
|
||||
return string
|
||||
.split(" ")
|
||||
.map((word) => {
|
||||
return word.charAt(0).toUpperCase() + word.slice(1);
|
||||
})
|
||||
.join(" ");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user