Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getEncoder(encoding) {
- const encoder = encoding === "utf8" ? new UTF8Encoder()
- : encoding === "utf16le" ? new UTF16Encoder(false)
- : encoding === "utf16be" ? new UTF16Encoder(true)
- : throw new Error("Unsupported encoding");
- }
Add Comment
Please, Sign In to add comment