Socket
Socket
Sign inDemoInstall

github-from-package

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-from-package

return the github url from a package.json file


Version published
Maintainers
1
Weekly downloads
4,461,026
decreased by-25.39%

Weekly downloads

Readme

Source

github-from-package

return the github url from a package.json file

build status

example

For the ./package.json file:

{
  "name": "beep-boop",
  "version": "1.2.3",
  "repository" : {
    "type" : "git",
    "url": "git@github.com:substack/beep-boop.git"
  }
}
var github = require('github-from-package');
var url = github(require('./package.json'));
console.log(url);
https://github.com/substack/beep-boop

methods

var github = require('github-from-package')

var url = github(pkg)

Return the most likely github url from the package.json contents pkg. If no github url can be determined, return undefined.

install

With npm do:

npm install github-from-package

license

MIT

Keywords

FAQs

Last updated on 29 Dec 2012

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc