Skip to content

PromptScript API


Function: isGitUrl()

isGitUrl(url): boolean

Defined in: resolver/src/git-url-utils.ts:84

Check if a URL is a Git repository URL.

Parameters

url

string

URL to check

Returns

boolean

True if the URL is a Git repository URL

Example

isGitUrl('https://github.com/org/repo.git'); // true
isGitUrl('git@github.com:org/repo.git'); // true
isGitUrl('https://example.com/api'); // false