import { Hasher } from "https://deno.land/x/rimbu@1.0.4/hashed/common/hasher.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) 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