first
This commit is contained in:
9
node_modules/@11ty/eleventy/src/Util/ValidUrl.js
generated
vendored
Normal file
9
node_modules/@11ty/eleventy/src/Util/ValidUrl.js
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
export default function isValidUrl(url) {
|
||||
try {
|
||||
new URL(url);
|
||||
return true;
|
||||
} catch (e) {
|
||||
// invalid url OR local path
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user