Package Exports
- stringencoding
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stringencoding) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
stringencoding
basic usage
// encode a string into a typed array given an encoding
var uint8array = TextEncoder(encoding).encode(string);
// decode typed array into a string
var string = TextDecoder(encoding).decode(uint8array);streaming decode
var string = '';
var decoder = TextDecoder(encoding), buffer;
while (buffer = next_chunk()) {
string += decoder.decode(buffer, { stream:true });
}
string += decoder.decode(); // finish the streaminstall
npm install stringencoding