This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Converts a snake case string to title case. | |
* Example: snake_case => Snake Case | |
* | |
* @param {String} str the string to convert | |
* @return {String} | |
*/ | |
Vue.filter('snakeToTitle', function (str) { | |
return str.split('_').map(function (item) { | |
return item.charAt(0).toUpperCase() + item.substring(1); |
NewerOlder