2024-03-18 13:20:47 +01:00
|
|
|
import { makeDateMatcher } from './date';
|
|
|
|
import { makeLiteralMatcher } from './literal';
|
|
|
|
import { makeNumberMatcher } from './number';
|
|
|
|
import { makeUserMatcher } from './user';
|
|
|
|
|
|
|
|
import { FieldMatcher, RangeEqualQualifier } from './types';
|
|
|
|
|
|
|
|
export interface MatcherFactory {
|
2024-07-03 22:54:14 +02:00
|
|
|
makeDateMatcher: (dateVal: string, qual: RangeEqualQualifier) => FieldMatcher;
|
|
|
|
makeLiteralMatcher: (term: string, fuzz: number, wildcardable: boolean) => FieldMatcher;
|
|
|
|
makeNumberMatcher: (term: number, fuzz: number, qual: RangeEqualQualifier) => FieldMatcher;
|
|
|
|
makeUserMatcher: (term: string) => FieldMatcher;
|
2024-03-18 13:20:47 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export const defaultMatcher: MatcherFactory = {
|
|
|
|
makeDateMatcher,
|
|
|
|
makeLiteralMatcher,
|
|
|
|
makeNumberMatcher,
|
|
|
|
makeUserMatcher,
|
|
|
|
};
|