CoolFace
Apppublic

AK-21/Graphite-Industrial-Intelligence

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
minurl.shared.d.ts20 linesDownload Raw Back to lib
1/**2 * Checks if a value has the shape of a WHATWG URL object.3 *4 * Using a symbol or instanceof would not be able to recognize URL objects5 * coming from other implementations (e.g. in Electron), so instead we are6 * checking some well known properties for a lack of a better test.7 *8 * We use `href` and `protocol` as they are the only properties that are9 * easy to retrieve and calculate due to the lazy nature of the getters.10 *11 * We check for auth attribute to distinguish legacy url instance with12 * WHATWG URL instance.13 *14 * @param {unknown} fileUrlOrPath15 *   File path or URL.16 * @returns {fileUrlOrPath is URL}17 *   Whether it’s a URL.18 */19export function isUrl(fileUrlOrPath: unknown): fileUrlOrPath is URL;20//# sourceMappingURL=minurl.shared.d.ts.map