1.0.0 • Published 6 years ago
utf8-uint8array v1.0.0
utf8-uint8array
Installation
npm install utf8-uint8arrayor
yarn add utf8-uint8arrayEncode UTF-8 string as Uint8Array
import { toBytes } from "utf8-uint8array";
const bytes: Uint8Array = toBytes("Привет 🌎");Decode Uint8Array as UTF-8 string
import { fromBytes } from "utf8-uint8array";
const bytes: Uint8Array;
const string: string = fromBytes(bytes);1.0.0
6 years ago