get-package-github-url
v1.0.5
Published
Get the github URL of a npm package
Downloads
2
Maintainers
Readme
get-package-github-url
Get the github URL of a npm package
Install
npm install get-package-github-url
or
yarn add get-package-github-url
Usage
import getPackageGithubUrl from 'get-package-github-url'
getPackageGithubUrl('promisify-dom-selector') // a sample npm package
.then((githubUrl) => {
// ...
})
// or you can use it with async/await
async () => {
const githubUrl = await getPackageGithubUrl('promisify-dom-selector')
// ...
}
API
getPackageGithubUrl(packageName)
packageName
Type: string
The name of a npm package. It corresponds to the field name
of the package.json
.
It returns null
if the github url is not found.
License
MIT © Marco Fugaro