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

Function string

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

Source from the content-addressed store, hash-verified

388 * @since 2.0.0
389 */
390export const string = (str: string) => {
391 let h = 5381, i = str.length
392 while (i) {
393 h = (h * 33) ^ str.charCodeAt(--i)
394 }
395 return optimize(h)
396}
397
398/**
399 * Computes a hash value for an object using only the specified keys.

Callers 2

hashFunction · 0.70
Hash.tsFile · 0.70

Calls 1

optimizeFunction · 0.85

Tested by

no test coverage detected