deno.com
method TextEncoder.prototype.encode
#TextEncoder.prototype.encode(input?: string): Uint8Array

UTF-8 encodes the input string and returns a Uint8Array containing the encoded bytes.

Parameters #

optional
#input: string = 'an empty string'

The text to encode.

Return Type #

Uint8Array