type URLCache = Map<string, URL>;
type RegExpCache = Map<string, RegExp>;
declare function isSafeUrl(url: unknown): boolean;
declare function replaceDomainPrefix(originalUrl: string, prefix: string): string;
type ReplaceDomainOptions = {
    encoded?: boolean;
    urlsCache?: URLCache;
    regexpsCache?: RegExpCache;
};
declare function getWildcardDomain(domain: string, cache?: URLCache): {
    wildcardDomain: string;
    prefix: string;
};
declare function replaceDomain(source: string, from: string, to: string, options?: ReplaceDomainOptions): string;
type URLWithMeta = Readonly<URL> & {
    isIP: boolean;
    isSpecialIP: boolean;
    isLocalhost: boolean;
};
declare function getUrlMeta(url: string): URLWithMeta | null;

export { type ReplaceDomainOptions, getUrlMeta, getWildcardDomain, isSafeUrl, replaceDomain, replaceDomainPrefix };
