mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2025-12-07 12:20:35 +01:00
11 lines
182 B
TypeScript
11 lines
182 B
TypeScript
export const isValidUrl = (possibleUrl: string): boolean => {
|
|
try {
|
|
/* eslint no-new: off */
|
|
new URL(possibleUrl);
|
|
} catch (_) {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
};
|