Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/deno/cli/js/text_encoding.ts>TextDecoder

A modern runtime for JavaScript and TypeScript.
Go to Latest
class TextDecoder
import { TextDecoder } from "https://deno.land/x/deno@v0.30.0/cli/js/text_encoding.ts";

Constructors

new
TextDecoder(label?, options?: TextDecoderOptions)

Properties

private
_encoding: string
readonly
encoding: string

Returns encoding's name, lowercased.

readonly
fatal: boolean

Returns true if error mode is "fatal", and false otherwise.

readonly
ignoreBOM: boolean

Returns true if ignore BOM flag is set, and false otherwise.

readonly
[Symbol.toStringTag]: string

Methods

decode(input?: domTypes.BufferSource, options?: TextDecodeOptions): string

Returns the result of running encoding's decoder.