major bug fixed + error handling

This commit is contained in:
Daniel
2023-06-27 03:05:12 +03:30
parent f1bd48be83
commit 92f6ee3942
10 changed files with 122 additions and 86 deletions
+8
View File
@@ -0,0 +1,8 @@
export default function isValidUrl(string: string) {
try {
new URL(string);
return true;
} catch (err) {
return false;
}
}