import { ParsedUrl } from '@autogram/url-tools'; import { UrlMatchStrategy } from './url-match-strategy.js'; export interface UrlFilterOptions { mode?: 'any' | 'all' | 'none'; contextUrl?: string | URL; } /** * Filters an array of incoming ParsedURL instances using the UrlFilterInput rules * supplied in the second parameter. */ export declare function filterUrls(input: T[], filters?: UrlFilterInput, options?: UrlFilterOptions): T[]; /** * Returns true if the input URL matches the specified filters. * * `options.contextUrl` must be supplied when using UrlMatchStrategy filters. * `options.mode` defaults to `any`, meaning that a URL will be 'matched' if * any of the filters return TRUE. `all` and `none` modes can change that behavior * to strict pass/fail of all filters. */ export declare function filterUrl(input: ParsedUrl, filters?: UrlFilterInput, options?: UrlFilterOptions): boolean; export type UrlFilter = UrlMatchStrategy | string | UrlGlobFilter | RegExp | UrlRegexFilter | UrlFilterFunction; export type UrlFilterInput = UrlFilter | UrlFilter[] | boolean; export declare function isUrlGlobFilter(input: unknown): input is UrlGlobFilter; export declare function isUrlRegexFilter(input: unknown): input is UrlRegexFilter; export type UrlGlobFilter = { property?: string; glob: string; reject?: true; }; export type UrlRegexFilter = { property?: string; regex: string | RegExp; reject?: true; }; export type UrlFilterFunction = (candidate: ParsedUrl, current?: ParsedUrl) => boolean | null; //# sourceMappingURL=filter-url.d.ts.map