This commit is contained in:
Sean Morley
2024-08-04 13:27:05 -04:00
parent 0c3664acf3
commit 860e6d4034
2 changed files with 68 additions and 8 deletions

View File

@@ -65,3 +65,12 @@ export async function exportData() {
const blob = new Blob([JSON.stringify(data)], { type: 'application/json' });
return URL.createObjectURL(blob);
}
export function isValidUrl(url: string) {
try {
new URL(url);
return true;
} catch (err) {
return false;
}
}