@asm/utf8
v0.3.1
Published
A fast UTF-8 encoding and decoding tools
Downloads
4
Maintainers
Readme
@asm/utf8
A fast UTF-8 encoding and decoding tools.
Installation
With npm:
npm install @asm/utf8
With yarn:
yarn add @asm/utf8
Usage
ES Modules
// Browser | Node v13.2
import { strToUtf8, utf8ToStr } from '@asm/utf8'; // ES6 (codePoint)
import { strToUtf8, utf8ToStr } from '@asm/utf8/legacy'; // ES5 (charCode)
// Node v12.8 --experimental-modules
// Node v12.0 --experimental-modules --es-module-specifier-resolution=node
// Node v8.6 --experimental-modules
import { strToUtf8, utf8ToStr } from '@asm/utf8/index';
CommonJS
const { strToUtf8, utf8ToStr } = require('@asm/utf8');