function hashCode()

in functions/readonly-in-response-schema.js [85:94]


function hashCode(str) {
  let hash = 0;
  for (let i = 0; i < str.length; i += 1) {
    /* eslint-disable no-bitwise */
    hash = ((hash << 5) - hash) + str.charCodeAt(i);
    hash |= 0; // Convert to 32bit integer
    /* eslint-enable no-bitwise */
  }
  return hash;
}