UNPKG

hd-utils

Version:

A handy utils for modern JS developers

8 lines (7 loc) 383 B
/** * @description will check if the passed input is a valid url, if tryUrlObj will try to create a URL object * if it was successful will return true, otherwise will return the result of the regex result. * @example isURL("www.google.com") // true * @example isURL("www.google.com", true) // false */ export default function isURL(input: string, tryUrlObj?: boolean): boolean;