mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-09 08:59:29 +02:00
[Bug] Fix camel case bug in strings.ts
(#6161)
This commit is contained in:
parent
7842bf435f
commit
d75836d720
@ -98,7 +98,9 @@ export function toTitleCase(str: string): string {
|
|||||||
*/
|
*/
|
||||||
export function toCamelCase(str: string) {
|
export function toCamelCase(str: string) {
|
||||||
return splitWords(str)
|
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("");
|
.join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user