UNPKG

maycur-business

Version:

maycur business react components of web

25 lines (19 loc) 573 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = hash; /* eslint-disable */ //github.com/darkskyapp/string-hash/blob/master/index.js https: "use strict"; function hash(str) { var hash = 5381, i = str.length; while (i) { hash = hash * 33 ^ str.charCodeAt(--i); } /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed * integers. Since we want the results to be always positive, convert the * signed int to an unsigned by doing an unsigned bitshift. */ return hash >>> 0; }