@exodus/bytes
    Preparing search index...
    • Implements BOM sniff legacy hook.

      Given a TypedArray or an ArrayBuffer instance input, returns either of:

      • 'utf-8', if input starts with UTF-8 byte order mark.
      • 'utf-16le', if input starts with UTF-16LE byte order mark.
      • 'utf-16be', if input starts with UTF-16BE byte order mark.
      • null otherwise.

      Parameters

      • input: ArrayBufferLike | ArrayBufferView<ArrayBufferLike>

        The bytes to check for BOM

      Returns "utf-8" | "utf-16le" | "utf-16be"

      The encoding ('utf-8', 'utf-16le', 'utf-16be'), or null if no BOM found