Takes a string as input, and returns a buffer containing the text given in parameters encoded with the UTF-8 method.
Optionalinput: stringText to encode.
Takes a string to encode and a destination Uint8Array to put resulting UTF-8 encoded text into, and returns a dictionary object indicating the progress of the encoding.
This is potentially more performant than the older encode() method.
Text to encode.
Buffer where to place the resulting UTF-8 encoded text into.
TextEncoder takes a stream of code points as input and emits a stream of bytes.
Since
1.69.2