text-stream-search
Version:
Searches for occurrences of a given search term in Node.js text streams
13 lines (12 loc) • 622 B
TypeScript
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 RegexSearch extends BaseSearch implements Search {
searchRegexp: RegExp;
constructor(regex: RegExp, accumulator: TextStreamAccumulator, resolve: ResolveFunction, reject: RejectFunction, timeout?: number);
check(text: string): Promise<void>;
getDisplayName(): string;
matches(text: string): boolean;
}