Apply the auto-fixable lint rules and the formatter, and drop the Vite build artifacts.
This commit is contained in:
@@ -80,7 +80,10 @@ export function fuzzyMatch(query: string, text: string): FuzzyMatch | null {
|
||||
}
|
||||
|
||||
/** Best fuzzy match across multiple strings (title, keywords, etc.). */
|
||||
export function fuzzyMatchAny(query: string, texts: Array<string | undefined | null>): FuzzyMatch | null {
|
||||
export function fuzzyMatchAny(
|
||||
query: string,
|
||||
texts: Array<string | undefined | null>,
|
||||
): FuzzyMatch | null {
|
||||
let best: FuzzyMatch | null = null;
|
||||
for (const text of texts) {
|
||||
if (!text) continue;
|
||||
@@ -95,7 +98,7 @@ export function fuzzyMatchAny(query: string, texts: Array<string | undefined | n
|
||||
export function fuzzyFilter<T>(
|
||||
items: T[],
|
||||
query: string,
|
||||
getTexts: (item: T) => Array<string | undefined | null>
|
||||
getTexts: (item: T) => Array<string | undefined | null>,
|
||||
): Array<{ item: T; score: number }> {
|
||||
const q = query.trim();
|
||||
if (!q) {
|
||||
|
||||
Reference in New Issue
Block a user