git-command-helper
Version:
github command helper for nodejs
19 lines (18 loc) • 602 B
TypeScript
export interface ParsedGitHubUrl {
protocol: string;
username: string | null;
password: string | null;
host: string;
owner: string;
repo: string;
path: string | null;
branch: string | null;
}
/**
* Parses a GitHub URL and extracts its components, including username and password if present.
*
* @param url - The GitHub URL to parse.
* @returns An object with the parsed components: { protocol, username, password, host, owner, repo, path }, or null if invalid.
*/
export declare function parseGitHubUrl(url: string): ParsedGitHubUrl;
export default parseGitHubUrl;