DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
check-if-a-javascript-string-is-a-url
const isUrl = string => { try { return Boolean(new URL(string)); } catch(e){ return false; } }
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
ADD COMMENT
Topic
COMMENT
Name
3+2 =
Submit