js-codepoints
v0.0.4
Published
make your javascript handle unicode codepoints more correctly
Downloads
3
Readme
codepoints.js
make your javascript handle unicode codepoints more correctly
SYNOPSIS
'𠮷野家'.length; // 4 // unfortunately
'𠮷野家'.codepoints; // 3 // naturally
String.fromCodePoint(0x20BB7); // '𠮷'
'𠮷野家'.codePointAt(0); // 0x20BB7
'𠮷野家'.toArrayOfUChar(); // ['𠮷','野','家']
'𠮷野家'.replace(RegExp.RE_UCHAR, '.'); // '...'