core-utils
    Preparing search index...
    • Creates a deterministic hash from items.

      The function sorts the strings, then generates a SHA-256 hash truncated to the specified number of characters.

      Parameters

      • params: { characters?: number; items: string[] | { id: string }[] }
        • Optionalcharacters?: number

          Number of characters in the resulting hash (default: 32).

        • items: string[] | { id: string }[]

          Array of strings or objects with id property to hash.

      Returns string

      A hash string of the specified length.