• Deterministically computes a short hash of any object for use as a reference name.

    Uses SHA-256 truncated to the specified length (default 12 characters). Deterministic json stringify ensures consistency regardless of key order.

    Parameters

    • o: any

      The object to hash

    • Optionallength: number

      The number of characters to return (default: 12)

    Returns Promise<string>

    A short hash suitable for reference names