Package Exports
- parse-git-url
- parse-git-url/dist/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (parse-git-url) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
parse-git-url
A lib for parsing the URL of GitHub, GitHub Enterprise Server (ghes), GitLab, and Bitbucket repositories.
Usage
import parseGitUrl from 'parse-git-url'
parseGitUrl('https://github.com/vercel/swr'))
// => {
// type: 'github',
// owner: 'vercel',
// name: 'swr',
// branch: '',
// sha: '',
// subdir: ''
// }
parseGitUrl('https://github.example.com/vercel/swr', 'github.example.com'))
// => {
// type: 'ghes',
// owner: 'vercel',
// name: 'swr',
// branch: '',
// sha: '',
// subdir: ''
// }
parseGitUrl('https://google.com')
// => nullIt supports parsing various URL schemas including SSH, branch, sha, commit, subdirectories, subgroups (GitLab), etc.