1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-19 04:49:37 +02:00
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;
}
}