UNPKG

@shopify/cli-kit

Version:

A set of utilities, interfaces, and models that are common across all the platform features

16 lines (15 loc) 529 B
/** * Check if the format of a URL is valid or not. * * @param url - URL to be checked. * @returns True if the URL is valid, false otherwise. * @throws An error if URL's constructor throws an error other than `TypeError`. */ export declare function isValidURL(url: string): boolean; /** * Safely parse a string into a URL. * * @param url - The string to parse into a URL. * @returns A URL object if the parsing is successful, undefined otherwise. */ export declare function safeParseURL(url: string): URL | undefined;