summaryrefslogtreecommitdiff
path: root/src/core/utils/toTitleCase.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/utils/toTitleCase.js')
-rw-r--r--src/core/utils/toTitleCase.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/core/utils/toTitleCase.js b/src/core/utils/toTitleCase.js
index 5cfd70d0..4335824d 100644
--- a/src/core/utils/toTitleCase.js
+++ b/src/core/utils/toTitleCase.js
@@ -1,8 +1,7 @@
-export default function toTitleCase(str) {
- return str.replace(
- /\w\S*/g,
- function(txt) {
- return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
- }
- );
-} \ No newline at end of file
+const toTitleCase = (str) => {
+ return str.replace(/\w\S*/g, function (txt) {
+ return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()
+ })
+}
+
+export default toTitleCase