node-ejs-renderer/node_modules/thingies/es2020/hash.js

12 lines
280 B
JavaScript
Raw Normal View History

2024-06-09 13:55:01 -04:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.hash = void 0;
const hash = (str) => {
let hash = 5381;
let i = str.length;
while (i)
hash = (hash * 33) ^ str.charCodeAt(--i);
return hash >>> 0;
};
exports.hash = hash;