UNPKG

qsu

Version:

qsu is a utility library that contains useful and frequently used functions. Start with your preferred language and the modern development environment.

1 lines 166 B
export function isUrl(t,r=!1,n=!1){if(n&&-1===t.indexOf("."))return!1;try{new URL(`${r&&-1===t.indexOf("://")?"https://":""}${t}`).toString()}catch{return!1}return!0}