@types/fuzzaldrin-plus
TypeScript icon, indicating that this package has built-in type declarations

0.6.5 • Public • Published

Installation

npm install --save @types/fuzzaldrin-plus

Summary

This package contains type definitions for fuzzaldrin-plus (https://github.com/jeancroy/fuzzaldrin-plus/).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fuzzaldrin-plus.

index.d.ts

export as namespace fuzzaldrin;

export class Query {
    $$__internal: Symbol;
}

export interface IOptions {
    allowErrors?: boolean | undefined;
    usePathScoring?: boolean | undefined;
    useExtensionBonus?: boolean | undefined;
    pathSeparator?: "/" | "\\" | string | undefined;
    optCharRegEx?: RegExp | undefined;
    wrap?: { tagOpen?: string | undefined; tagClass?: string | undefined; tagClose?: string | undefined } | undefined;
    preparedQuery?: Query | undefined;
}

export type IFilterOptions<T> = IOptions & {
    key?: T extends string ? never : keyof T | undefined;
    maxResults?: number | undefined;
    maxInners?: number | undefined;
};

export function filter<T>(
    data: T[],
    query: string,
    options?: IFilterOptions<T>,
): T[];
export function score(str: string, query: string, options?: IOptions): number;
export function match(str: string, query: string, options?: IOptions): number[];
export function wrap(str: string, query: string, options?: IOptions): string;
export function prepareQuery(query: string, options?: IOptions): Query;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by Jean Christophe Roy, Jason Killian, and Ronald Rey.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/fuzzaldrin-plus

Weekly Downloads

25,162

Version

0.6.5

License

MIT

Unpacked Size

5.16 kB

Total Files

5

Last publish

Collaborators

  • types