capitalize category name

This commit is contained in:
Andrey Meshkov 2018-10-14 23:42:25 +03:00
parent dcbee729fb
commit c9736ec0fa
3 changed files with 7 additions and 2 deletions
client/src/helpers

View file

@ -81,3 +81,5 @@ export const getPercent = (amount, number) => {
}
return 0;
};
export const captitalizeWords = text => text.split(/[ -_]/g).map(str => str.charAt(0).toUpperCase() + str.substr(1)).join(' ');