Debian Codegraph @

types-fuzzaldrin-plus/README.md

raw
1 # Installation
2 > `npm install --save @types/fuzzaldrin-plus`
3
4 # Summary
5 This package contains type definitions for fuzzaldrin-plus (https://github.com/jeancroy/fuzzaldrin-plus/).
6
7 # Details
8 Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fuzzaldrin-plus.
9 ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fuzzaldrin-plus/index.d.ts)
10 ````ts
11 export as namespace fuzzaldrin;
12
13 export class Query {
14 $$__internal: Symbol;
15 }
16
17 export interface IOptions {
18 allowErrors?: boolean | undefined;
19 usePathScoring?: boolean | undefined;
20 useExtensionBonus?: boolean | undefined;
21 pathSeparator?: "/" | "\\" | string | undefined;
22 optCharRegEx?: RegExp | undefined;
23 wrap?: { tagOpen?: string | undefined; tagClass?: string | undefined; tagClose?: string | undefined } | undefined;
24 preparedQuery?: Query | undefined;
25 }
26
27 export type IFilterOptions<T> = IOptions & {
28 key?: T extends string ? never : keyof T | undefined;
29 maxResults?: number | undefined;
30 maxInners?: number | undefined;
31 };
32
33 export function filter<T>(
34 data: T[],
35 query: string,
36 options?: IFilterOptions<T>,
37 ): T[];
38 export function score(str: string, query: string, options?: IOptions): number;
39 export function match(str: string, query: string, options?: IOptions): number[];
40 export function wrap(str: string, query: string, options?: IOptions): string;
41 export function prepareQuery(query: string, options?: IOptions): Query;
42
43 ````
44
45 ### Additional Details
46 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
47 * Dependencies: none
48
49 # Credits
50 These definitions were written by [ Jean Christophe Roy](https://github.com/jeancroy), [Jason Killian](https://github.com/jkillian), and [Ronald Rey](https://github.com/reyronald).