(o: A, keys: ReadonlyArray<keyof A>)
| 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 |