UNPKG

graphql-language-service-server

Version:
13 lines 324 B
export default 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; } //# sourceMappingURL=stringToHash.js.map