docx
    Preparing search index...

    Function hashedId

    • Generates a SHA-1 hash of the provided data.

      Useful for generating deterministic IDs based on content, such as for image references or revision tracking.

      Parameters

      • data: string | ArrayBuffer | Buffer<ArrayBufferLike> | Uint8Array<ArrayBufferLike>

        The data to hash (Buffer, string, Uint8Array, or ArrayBuffer)

      Returns string

      A hexadecimal string representation of the SHA-1 hash

      const hash = hashedId("Hello World"); // Returns "0a4d55a8d778e5022fab701977c5d840bbc486d0"