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.
The object to hash
The number of characters to return (default: 12)
A short hash suitable for reference names
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.