UNPKG

@xn-sakina/hoshino-wasm

Version:

Fast string seaching powered by Rust

40 lines (25 loc) 1.21 kB
/* auto-generated by NAPI-RS */ /* eslint-disable */ export function findAllMatch(input: Input, opts?: Options | undefined | null): Promise<FindOutput[]> export function findAllMatchSync(input: Input, opts?: Options | undefined | null): Array<FindOutput> export function findLeftFirstLongestMatch(input: Input, opts?: Options | undefined | null): Promise<FindOutput> export function findLeftFirstLongestMatchSync(input: Input, opts?: Options | undefined | null): FindOutput export function findLeftFirstMatch(input: Input, opts?: Options | undefined | null): Promise<FindOutput> export function findLeftFirstMatchSync(input: Input, opts?: Options | undefined | null): FindOutput export function findMatch(input: Input, opts?: Options | undefined | null): Promise<FindOutput> export function findMatchSync(input: Input, opts?: Options | undefined | null): FindOutput export interface FindOutput { start?: number end?: number pattern?: number matched: boolean } export function getTargetTriple(): string export interface Input { haystack: string patterns?: Array<string> } export function loadPatterns(patterns: Array<string>): void export interface Options { caseInsensitive?: boolean }