UNPKG

@imranbarbhuiya/mongoose-fuzzy-searching

Version:
11 lines (10 loc) 555 B
import { NgramOptions } from "../types"; /** * Creates sequence of characters taken from the given string. * @param text - The string for the sequence. * @param minSize - Lower limit to start creating sequence. * @param prefixOnly -Only return ngrams from start of word. * @return The sequence of characters in array of strings. */ export declare const nGrams: (text: string, minSize: number, prefixOnly?: boolean) => string[]; export declare const makeNGrams: ({ text, escapeSpecialCharacters, minSize, prefixOnly, }: NgramOptions) => string[];