AutoMovie API
    Preparing search index...

    Variable utf8BytesConst

    utf8Bytes: (text: string) => number[] = ...

    Encode a string as UTF-8 bytes without TextEncoder.

    TextEncoder is present in Node 22 and in every browser, but not in every embedder the viewer is dropped into, and a digest that silently changes when a polyfill differs is worse than a loop. Lone surrogates encode as U+FFFD, which is what TextEncoder does, so an id carrying broken UTF-16 still digests identically on both sides.

    Type Declaration

      • (text: string): number[]
      • Parameters

        • text: string

        Returns number[]