TextDecoder

Classin globals@fastly/js-compute 4.0.0View source

TextDecoder takes a stream UTF-8 bytes as input and emits a stream of code points

See also

Note: On Fastly Compute, TextDecoder only supports UTF-8 bytes as input, and always operates in non-fatal mode.

Constructor

new TextDecoder(label?: 'unicode-1-1-utf-8' | 'utf-8' | 'utf8')

Parameters

label: 'unicode-1-1-utf-8' | 'utf-8' | 'utf8'optional

Properties

encoding

'utf-8'read-onlyView source

Methods

decode(input?: ArrayBuffer | ArrayBufferView): string

Parameters

input: ArrayBuffer | ArrayBufferViewoptional

Returns

string