mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-07 16:09:27 +02:00
[Bug] Fix camel case bug in strings.ts
(#6161)
This commit is contained in:
parent
3434078329
commit
157b662f9e
@ -98,7 +98,9 @@ export function toTitleCase(str: string): string {
|
||||
*/
|
||||
export function toCamelCase(str: string) {
|
||||
return splitWords(str)
|
||||
.map((word, index) => (index === 0 ? word.toLowerCase() : capitalizeFirstLetter(word)))
|
||||
.map((word, index) =>
|
||||
index === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1).toLowerCase(),
|
||||
)
|
||||
.join("");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user