utf8-uint8array
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

utf8-uint8array

Installation

npm install utf8-uint8array

or

yarn add utf8-uint8array

Encode 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);

Package Sidebar

Install

npm i utf8-uint8array

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

4.03 kB

Total Files

4

Last publish

Collaborators

  • sergeysova