@kuma-ui/sheet
Version:
🐻 Kuma UI is a utility-first, zero-runtime CSS-in-JS library that offers an outstanding developer experience and optimized performance.
25 lines (23 loc) • 398 B
JavaScript
// src/hash.ts
function generateHash(str) {
const m = 1540483477;
const r = 24;
const seed = 305419896;
const len = str.length;
let h = seed ^ len;
for (let i = 0; i < len; i++) {
let k = str.charCodeAt(i);
k *= m;
k ^= k >>> r;
k *= m;
h *= m;
h ^= k;
}
h ^= h >>> 13;
h *= m;
h ^= h >>> 15;
return (h >>> 0).toString();
}
export {
generateHash
};