feats: add url stats charts

This commit is contained in:
oiov
2024-08-02 17:00:42 +08:00
parent fd3cb20f44
commit 4e87d5e2a7
9 changed files with 1140 additions and 14 deletions
+9
View File
@@ -207,3 +207,12 @@ export function generateUrlSuffix(length: number = 6): string {
return result;
}
export function isLink(str: string): boolean {
try {
const url = new URL(str);
return true;
} catch (_) {
return false;
}
}