MCPcopy Index your code
hub / github.com/dataease/SQLBot / hash

Function hash

frontend/public/swagger-ui-bundle.js:2089–2106  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

2087 return ((s >>> 1) & 1073741824) | (3221225471 & s)
2088 }
2089 function hash(s) {
2090 if (!1 === s || null == s) return 0
2091 if ('function' == typeof s.valueOf && (!1 === (s = s.valueOf()) || null == s))
2092 return 0
2093 if (!0 === s) return 1
2094 var o = typeof s
2095 if ('number' === o) {
2096 if (s != s || s === 1 / 0) return 0
2097 var i = 0 | s
2098 for (i !== s && (i ^= 4294967295 * s); s > 4294967295; ) i ^= s /= 4294967295
2099 return smi(i)
2100 }
2101 if ('string' === o) return s.length > Se ? cachedHashString(s) : hashString(s)
2102 if ('function' == typeof s.hashCode) return s.hashCode()
2103 if ('object' === o) return hashJSObj(s)
2104 if ('function' == typeof s.toString) return hashString(s.toString())
2105 throw new Error('Value type ' + o + ' cannot be hashed.')
2106 }
2107 function cachedHashString(s) {
2108 var o = Pe[s]
2109 return (

Callers 4

createNodesFunction · 0.85
hashIterableFunction · 0.85
__hash__Method · 0.85

Calls 6

smiFunction · 0.85
cachedHashStringFunction · 0.85
hashStringFunction · 0.85
hashJSObjFunction · 0.85
valueOfMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected