Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/ext/web/lib.deno_web.d.ts>TextEncoder

A modern runtime for JavaScript and TypeScript.
Go to Latest
interface TextEncoder
import { type TextEncoder } from "https://deno.land/x/deno@v1.38.4/ext/web/lib.deno_web.d.ts";

Properties

readonly
encoding: "utf-8"

Returns "utf-8".

Methods

encode(input?: string): Uint8Array

Returns the result of running UTF-8's encoder.

encodeInto(input: string, dest: Uint8Array): TextEncoderEncodeIntoResult
variable TextEncoder
import { TextEncoder } from "https://deno.land/x/deno@v1.38.4/ext/web/lib.deno_web.d.ts";

type

{ readonly prototype: TextEncoder; new (): TextEncoder; }