@exodus/bytes
    Preparing search index...
    • Create an encoder for a supported one-byte encoding, given its lowercased name encoding.

      Returns a function encode(string) that encodes a string to bytes.

      In 'fatal' mode (default), will throw on non well-formed strings or any codepoints which could not be encoded in the target encoding.

      Parameters

      • encoding: string

        The encoding name (e.g., 'iso-8859-1', 'windows-1252')

      • Optionaloptions: { mode?: "fatal" }

        Encoding options

        • Optionalmode?: "fatal"

          Encoding mode (default: 'fatal'). Currently, only 'fatal' mode is supported.

      Returns (string: string) => Uint8Array

      A function that encodes string to bytes