Skip to main content

findFuzzyMatch

Stentor API Reference


Stentor API Reference / stentor-utils/src / findFuzzyMatch

Function: findFuzzyMatch()

findFuzzyMatch\<T>(find, from, options): T[]

Defined in: packages/stentor-utils/src/matcher.ts:127

From the provided string, find the closest match from the items provided.

This is a simple wrapper around Fuse.js

Type Parameters​

T​

T = string | Record\<string, unknown>

Parameters​

find​

string

The query to find a match from

from​

T[]

options​

FuzzyMatchOptions = {}

Returns​

T[]