UNPKG

text-stream-search

Version:

Searches for occurrences of a given search term in Node.js text streams

13 lines (12 loc) 621 B
import TextStreamAccumulator from "text-stream-accumulator"; import { RejectFunction } from "../types/reject-function.js"; import { ResolveFunction } from "../types/resolve-function.js"; import Search from "../types/search.js"; import BaseSearch from "./base-search"; export default class StringSearch extends BaseSearch implements Search { searchText: string; constructor(query: string, accumulator: TextStreamAccumulator, resolve: ResolveFunction, reject: RejectFunction, timeout?: number); check(text: string): Promise<void>; getDisplayName(): string; matches(text: string): boolean; }