📝 Count how many times each character appears on string. It's a simple package, but if you need to count how many times each character occurs in a big text you can use.
Can be used with CommonJS, AMD or vannila JS in browser.
// not case sensitive example
countCharsOcurrences('ABcC'); // {"A":1,"B":1,"C":2}
// case sensitive example, converts all to upper case
countCharsOcurrences('ABcC', true); //{"A":1,"B":1,"c":1,"C":1}
Realease under MIT License
Thanks Gabriel Reitz Giannattasio for the simple version