js-codepoints

0.0.4 • Public • Published

build status

codepoints.js

make your javascript handle unicode codepoints more correctly

SYNOPSIS

'𠮷野家'.length;                          // 4 // unfortunately
'𠮷野家'.codepoints;                      // 3 // naturally
String.fromCodePoint(0x20BB7);            // '𠮷'
'𠮷野家'.codePointAt(0);                  // 0x20BB7
'𠮷野家'.uCharAt(0);                      // 𠮷
'𠮷野家'.toArrayOfUChars();               // ['𠮷','野','家']
'𠮷野家'.replace(RegExp.RE_UCHARS, '!');  // '!!!'

Readme

Keywords

none

Package Sidebar

Install

npm i js-codepoints

Weekly Downloads

4

Version

0.0.4

License

BSD

Last publish

Collaborators

  • dankogai