MCPcopy Create free account
hub / github.com/Effect-TS/effect / string

Function string

packages/effect/src/Hash.ts:368–374  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

366 * @since 2.0.0
367 */
368export const string = (str: string) => {
369 let h = 5381, i = str.length
370 while (i) {
371 h = (h * 33) ^ str.charCodeAt(--i)
372 }
373 return optimize(h)
374}
375
376/**
377 * Computes a hash value for an object using only the specified keys.

Callers 4

hashFunction · 0.70
numberFunction · 0.70
Hash.tsFile · 0.70
withVisitedTrackingFunction · 0.70

Calls 1

optimizeFunction · 0.85

Tested by

no test coverage detected