Interface WordSimilaritySortOptions

Options for wordSimilaritySort.

interface WordSimilaritySortOptions {
    caseSensitive?: boolean;
    compareFn?: ((a: string, b: string) => number);
}
Hierarchy

Properties

caseSensitive?: boolean

Whether the distance should include case.

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

A custom comparison function to use for comparing strings.

Type declaration

    • (a, b): number
    • Parameters

      • a: string

        The first string for comparison.

      • b: string

        The second string for comparison.

      Returns number

      The distance between the two strings.

{levenshteinDistance}