Skip to content

fabeuluci/text-coder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Common interface for TextEncoder & TextDecoder

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published