0.0.3 • Published 6 months ago

@topgunbuild/textencoder v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

What?

Encode/decode Uint8Arrays to strings.

This is just a thin wrapper that provides an isomorphic API.

  • To perform UTF8 conversion in the browser it uses the native TextEncoder.
  • In Node it uses Buffer and Uint8Array.

Install

npm install @topgunbuild/textencoder

Usage

const textencoder = require('@topgunbuild/textencoder')
// or
import textencoder from '@topgunbuild/textencoder';

textencoder.encode('Hello') // Uint8Array [ 72, 101, 108, 108, 111 ]

License

MIT

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

9 months ago