Function
structureKeys
(o: A, keys: ReadonlyArray<keyof A>)
Source from the content-addressed store, hash-verified
| 136 | * @category hashing |
| 137 | */ |
| 138 | export 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 |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…