uni-ticket-system/node_modules/licia/strHash.js

11 lines
203 B
JavaScript
Raw Normal View History

2023-12-05 02:11:10 +00:00
exports = function(str) {
var hash = 5381;
var i = str.length;
while (i) {
hash = (hash << 5) + hash + str.charCodeAt(--i);
}
return hash >>> 0;
};
module.exports = exports;