ClosestStringOptions

import { ClosestStringOptions } from "jsr:@ende/text";

interface

interface ClosestStringOptions

Options for closestString.

Properties

caseSensitive

caseSensitive?: boolean

Whether the distance should include case.

Default: false

compareFn

compareFn?: (a: string, b: string) => number

A custom comparison function to use for comparing strings.

Default: levenshteinDistance

Returns

The distance between the two strings.

Source