import { Hasher } from "https://deno.land/x/rimbu@0.13.1/core/main/index.ts";
const { arrayHasher } = Hasher;
Returns a Hasher that hashes arrays of elements by sampling the array and using
the given itemHasher
to hash the sampled elements.
Examples
Example 1
Example 1
const h = Hasher.arrayHasher()
console.log(h.hash([1, 2, 3] === h.hash([1, 3, 2])))
// => false
Parameters
optional
options: { itemHasher?: Hasher<T>; maxStepBits?: number; }- (optional) an object containing the following items:
- itemHasher - (optional) a Hasher instance used to hash elements in the array
- maxStepBits - (optional) the amount of bits to determine the maximum amount of array elements to process