Mencode
Bun

method

util.TextEncoder.encode

input?: string
): NonSharedUint8Array;

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

@param input

The text to encode.