|
@@ -3,11 +3,13 @@ import { processLineFromReadline } from './process-line';
|
|
|
|
|
|
|
|
import createKeywordFilter from './aho-corasick';
|
|
import createKeywordFilter from './aho-corasick';
|
|
|
|
|
|
|
|
|
|
+// eslint-disable import-x/no-unresolved -- benchmark
|
|
|
import ModernAhoCorasick from 'modern-ahocorasick';
|
|
import ModernAhoCorasick from 'modern-ahocorasick';
|
|
|
import { AhoCorasick as MonyoneAhoCorasick } from '@monyone/aho-corasick';
|
|
import { AhoCorasick as MonyoneAhoCorasick } from '@monyone/aho-corasick';
|
|
|
// @ts-expect-error -- no types
|
|
// @ts-expect-error -- no types
|
|
|
import FastScanner from 'fastscan';
|
|
import FastScanner from 'fastscan';
|
|
|
import { AhoCorasick as RustAhoCorasick } from '@blackglory/aho-corasick';
|
|
import { AhoCorasick as RustAhoCorasick } from '@blackglory/aho-corasick';
|
|
|
|
|
+// eslint-enable import-x/no-unresolved
|
|
|
|
|
|
|
|
function runKeywordFilter(data: string[], testFn: (line: string) => boolean) {
|
|
function runKeywordFilter(data: string[], testFn: (line: string) => boolean) {
|
|
|
for (let i = 0, len = data.length; i < len; i++) {
|
|
for (let i = 0, len = data.length; i < len; i++) {
|