1// TinySimpleHash, public domain 2// https://stackoverflow.com/a/52171480 3export const tinyhash = (str: string): number => { 4 for (var i = str.length, h = 9; i; ) { 5 h = Math.imul(h ^ str.charCodeAt(--i), 9 ** 9); 6 } 7 8 return h ^ (h >>> 9); 9};