mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-18 06:04:05 +00:00
6 lines
268 B
TypeScript
6 lines
268 B
TypeScript
const GIT_HOSTS = ["github.com", "gitlab.com", "bitbucket.org", "codeberg.org"];
|
|
|
|
export function looksLikeGitUrl(source: string): boolean {
|
|
const normalized = source.replace(/^https?:\/\//, "");
|
|
return GIT_HOSTS.some((host) => normalized.startsWith(`${host}/`));
|
|
}
|