/** Non-cryptographic hash for cache keys and display purposes — do not use for security. */
export function strToHash(str: string): number {
  let hash = 0;
  for (let i = 0; i < str.length; i++) {
    hash = str.charCodeAt(i) + ((hash << 5) - hash);
  }
  return hash;
}
