MCPcopy Index your code
hub / github.com/Effect-TS/effect / structureKeys

Function structureKeys

packages/effect/src/Hash.ts:138–144  ·  view source on GitHub ↗
(o: A, keys: ReadonlyArray<keyof A>)

Source from the content-addressed store, hash-verified

136 * @category hashing
137 */
138export const structureKeys = <A extends object>(o: A, keys: ReadonlyArray<keyof A>) => {
139 let h = 12289
140 for (let i = 0; i < keys.length; i++) {
141 h ^= pipe(string(keys[i]! as string), combine(hash((o as any)[keys[i]!])))
142 }
143 return optimize(h)
144}
145
146/**
147 * @since 2.0.0

Callers 1

structureFunction · 0.85

Calls 5

pipeFunction · 0.70
stringFunction · 0.70
combineFunction · 0.70
hashFunction · 0.70
optimizeFunction · 0.70

Tested by

no test coverage detected