Skip to main content
Module

x/rimbu/mod.ts>Hasher.dateHasher

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
function Hasher.dateHasher
import { Hasher } from "https://deno.land/x/rimbu@0.13.1/mod.ts";
const { dateHasher } = Hasher;

Returns a Hasher instance that hashes Dates.

Examples

Example 1

const h = Hasher.dateHasher()
const d1 = new Date()
const d2 = new Date(d1)
console.log(h.hash(d1) === h.hash(d2))
// => true