Constructors
constructor
- new TextDecoder(label?: "utf-8" | "unicode-1-1-utf-8" | "utf8"): TextDecoder
-
Parameters
-
Optional
label: "utf-8" | "unicode-1-1-utf-8" | "utf8"
Accessors
encoding
- get encoding(): "utf-8"
-
Returns "utf-8"
Methods
decode
- decode(input?: ArrayBuffer | ArrayBufferView): string
-
Returns string
TextDecoder takes a stream UTF-8 bytes as input and emits a stream of code points
See
TextDecoder on MDN
Note: On Compute@Edge, TextDecoder only supports UTF-8 bytes as input, and always operates in non-fatal mode.