i2
v0.0.2
Published
Unicode Toolkit
Downloads
5
Readme
i2
Character Encoding and Decoding Toolkit
Collection of character encoding methods.
Table of contents
Links
Get Started
const i2 = require('i2');
i2.unicode2utf8(20320);
// RETURN [0xE4, 0xBD, 0xA0];
i2.unicode2utf16.be(20320);
// RETURN [0x4F, 0x60]
i2.unicode2utf32.be(20320);
// RETURN [0x00, 0x00, 0x4F, 0x60]
API
- number[] i2.unicode2utf8(number unicode)
- number[] i2.unicode2utf16(number unicode, "be" | "le" type =
"be"
) - number[] i2.unicode2utf16.be(number unicode)
- number[] i2.unicode2utf16.le(number unicode)
- number[] i2.unicode2utf32(number unicode, "be" | "le" type =
"be"
) - number[] i2.unicode2utf32.be(number unicode)
- number[] i2.unicode2utf32.le(number unicode)