mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-14 04:50:05 +02:00
10 lines
265 B
TypeScript
10 lines
265 B
TypeScript
import { sanitizeUrl } from "@braintree/sanitize-url";
|
|
|
|
export const normalizeLink = (link: string) => {
|
|
return sanitizeUrl(link);
|
|
};
|
|
|
|
export const isLocalLink = (link: string | null) => {
|
|
return !!(link?.includes(location.origin) || link?.startsWith("/"));
|
|
};
|