{"version":3,"file":"is-url.mjs","names":[],"sources":["../src/is-url.ts"],"sourcesContent":["/**\n * Determines whether the given string looks like a URL.\n *\n * @param url The string to scrutinise.\n *\n * @example\n * ```js\n * const isURL = isURL( 'https://wordpress.org' ); // true\n * ```\n *\n * @see https://url.spec.whatwg.org/\n * @see https://url.spec.whatwg.org/#valid-url-string\n *\n * @return Whether or not it looks like a URL.\n */\nexport function isURL( url: string ): boolean {\n\t// A URL can be considered value if the `URL` constructor is able to parse\n\t// it. The constructor throws an error for an invalid URL.\n\ttry {\n\t\tnew URL( url );\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,SAAgB,MAAO,KAAuB;CAG7C,IAAI;EACH,IAAI,IAAK,GAAI;EACb,OAAO;CACR,QAAQ;EACP,OAAO;CACR;AACD"}