Fix capitalization function
This commit is contained in:
+1
-1
@@ -101,7 +101,7 @@ export function capitalize(str) {
|
|||||||
|
|
||||||
return str
|
return str
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.split(/[ -_]/g)
|
.split(/[-_ ]/g)
|
||||||
.filter((word) => !!word)
|
.filter((word) => !!word)
|
||||||
.map((word) => {
|
.map((word) => {
|
||||||
return word.charAt(0).toUpperCase() + word.slice(1);
|
return word.charAt(0).toUpperCase() + word.slice(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user