charcount
Count visual length of javascript string.
Some symbols in JavaScript can occupy 2 characters (surrogate pair). This package count string length as you see it in browser:
var charcount = ; console; // => 1console; // => 2
Related projects
If you works with strings for terminal output, you may wish to ignore ASCII escape sequences. See those projects then: