create modules to implement this features
- convert string to title capitalized
- sanitize a string
- count word frequency
function capitalize(str) {
let aux;
let arr = [];
str.split(/ +/).map(function(word) {
aux = word.substring(0, 1).toUpperCase() + word.substring(1, word.length).toLowerCase();
arr.push(aux);
});
return arr.join(" ");
}