get-package-github-url

1.0.5 • Public • Published

get-package-github-url Build Status Dependency Status devDependency Status

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

Package Sidebar

Install

npm i get-package-github-url

Weekly Downloads

0

Version

1.0.5

License

MIT

Last publish

Collaborators

  • marcofugaro