decode

fun decode(input: AllowSharedBufferSource = definedExternally, options: TextDecodeOptions = definedExternally): String(source)

The TextDecoder.decode() method returns a string containing text decoded from the buffer passed as a parameter.

MDN Reference