I was playing around with the Nodejs Buffer.from(<string>).toString("utf16le") but I can't find an HTML/DOM equivalent without browserify and whatnot. Is there an easy way to do this?
1 Answer 1
function debuffer(array){
let td=new TextDecoder
let raw=new Uint8Array(array)
return td.decode(ua)
}
should do the job
Sign up to request clarification or add additional context in comments.
Comments
lang-html
TextEncoder, bututf-16andutf-16lehas been removed it seems. Maybe try a polyfill, like some mentioned here.