diff options
Diffstat (limited to 'src/core/utils/toTitleCase.js')
| -rw-r--r-- | src/core/utils/toTitleCase.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/utils/toTitleCase.js b/src/core/utils/toTitleCase.js index 5cfd70d0..b2751f0b 100644 --- a/src/core/utils/toTitleCase.js +++ b/src/core/utils/toTitleCase.js @@ -1,8 +1,10 @@ -export default function toTitleCase(str) { +const 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 +} + +export default toTitleCase
\ No newline at end of file |
