UNPKG

165 BJavaScriptView Raw
1export function fromUtf8(input) {
2 return new TextEncoder().encode(input);
3}
4export function toUtf8(input) {
5 return new TextDecoder("utf-8").decode(input);
6}