graphql-language-service-server
Version:
Server process backing the GraphQL Language Service
16 lines • 418 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
function stringToHash(str) {
let hash = 0;
if (str.length === 0) {
return hash;
}
for (let i = 0; i < str.length; i++) {
const chr = str.charCodeAt(i);
hash = (hash << 5) - hash + chr;
hash |= 0;
}
return hash;
}
exports.default = stringToHash;
//# sourceMappingURL=stringToHash.js.map
;