text-coder
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

text-coder

Common interface for TextEncoder & TextDecoder. In node uses util module. In browser uses classes from global scope and shim if they are not available. Typings included.

Example

import {TextEncoder, TextDecoder} from "text-coder";

let text = "Some text";

let te = new TextEncoder();
let array = te.encode(text);

let td = new TextDecoder();
let res = td.decode(array);

console.log(text == res, text, array, res);

License

The MIT License (MIT)

Readme

Keywords

none

Package Sidebar

Install

npm i text-coder

Weekly Downloads

6

Version

1.0.0

License

MIT

Unpacked Size

4.91 kB

Total Files

6

Last publish

Collaborators

  • fabeuluci