Skip to main content
Module

x/rimbu/hashed/mod.ts

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Latest
import * as rimbu from "https://deno.land/x/rimbu@1.2.1/hashed/mod.ts";

Functions

Returns a Hasher instance that hashes any value, and traverses into an object or array to hash its elements.

Returns a Hasher instance that hashes any value, but never traverses into an object or array to hash its elements. In those cases it will use toString.

Returns a Hasher instance that hashes any value by hashing the string resulting from applying JSON.stringify to the value.

Returns a Hasher instance that hashes any value, but only traverses into an object or array to hash its elements one level deep. After one level, it will use toString.

Returns a Hasher instance that hashes the string representation of any value

Returns a Hasher that hashes arrays of elements by sampling the array and using the given itemHasher to hash the sampled elements.

Returns a Hasher instance that hashes bigints.

Returns a Hasher instance that hashes booleans.

Returns a Hasher instance that hashes the .valueOf value of the given object using the given valueHasher for instances of given cls class.

Returns a Hasher instance that hashes Dates.

Returns a Hasher instance that hashes numbers, including 'special' values like NaN and infinities.

Returns a Hasher instance that hashes objects of key type K and value type V. If a value if an object or array, it will recursively hash its values.

Returns a Hasher instance that hashes objects of key type K and value type V.

Returns a Hasher instance that hashes objects of key type K and value type V. If a value if an object or array, it will convert those values to a string.

Returns a Hasher instance that hashes any StreamSource limited to a certain amount of elements to prevent haning on infinite streams.

Returns a Hasher instance for string values.

Returns a Hasher that will return equal hash values for values in a tuple regardless of their order, and uses the given hasher function to hash the tuple elements.

Interfaces

Interface used to hash objects for hashed collections.

A type-invariant immutable Map of key type K, and value type V. In the Map, each key has exactly one value, and the Map cannot contain duplicate keys. See the Map documentation and the HashMap API documentation

A mutable HashMap builder used to efficiently create new immutable instances. See the Map documentation and the HashMap.Builder API documentation

A context instance for a HashMap that acts as a factory for every instance of this type of collection.

A non-empty type-invariant immutable Map of key type K, and value type V. In the Map, each key has exactly one value, and the Map cannot contain duplicate keys. See the Map documentation and the HashMap API documentation

Utility interface that provides higher-kinded types for this collection.

A type-invariant immutable Set of value type T. In the Set, there are no duplicate values. See the Set documentation and the HashSet API documentation

A mutable HashSet builder used to efficiently create new immutable instances. See the Set documentation and the HashSet.Builder API documentation

A context instance for a HashSet that acts as a factory for every instance of this type of collection.

A non-empty type-invariant immutable Set of value type T. In the Set, there are no duplicate values. See the Set documentation and the HashSet API documentation

Utility interface that provides higher-kinded types for this collection.