%PDF- %PDF-
Direktori : /home/emergentqj/actioncivile/pre-auth/.f81b4c9eb38fd76cdf20462cf2027aa3/static/node_modules/styled-components/src/utils/ |
Current File : /home/emergentqj/actioncivile/pre-auth/.f81b4c9eb38fd76cdf20462cf2027aa3/static/node_modules/styled-components/src/utils/hash.ts |
export const SEED = 5381; // When we have separate strings it's useful to run a progressive // version of djb2 where we pretend that we're still looping over // the same string export const phash = (h: number, x: string) => { let i = x.length; while (i) { h = (h * 33) ^ x.charCodeAt(--i); } return h; }; // This is a djb2 hashing function export const hash = (x: string) => { return phash(SEED, x); };