Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/rimbu/proximity/common/keyMatching.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/proximity/common/keyMatching.ts";

Functions

Given an Iterable of [key, value] entries, applies the distance function to each key, finding the one closest to the input key, also returning its associated value as well as the related distance; returns undefined only when there are no successful match - that is, all the keys have +inf distance.

Type Aliases

Match between a reference key and the closest key in a [key, value] collection: