Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
declare namespace githubUrlFromGit {
interface githubUrlFromGitOptions {
/**
* additional URLs that should be treated as GitHub repos
*/
extraBaseUrls?: string[];
}

/**
* Create a regular expression to parse GitHub URLs
*
* @param opts options for regular expression generator
*/
function re(opts?: githubUrlFromGitOptions): RegExp;
}

/**
* Normalize Git URLs into GitHub URLs
*
* @param url Git URL to process
* @param opts options for URL parser
* @returns GitHub URL
*/
declare function githubUrlFromGit(
url: string,
opts?: githubUrlFromGit.githubUrlFromGitOptions
): string;

export = githubUrlFromGit;