Socket
Socket
Sign inDemoInstall

stringify-github-url

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    stringify-github-url

Generate a GitHub URL from an object.


Version published
Weekly downloads
151
increased by17.97%
Maintainers
1
Install size
7.68 kB
Created
Weekly downloads
 

Readme

Source

stringify-github-url NPM version

Generate a GitHub URL from an object.

Install with npm

npm i stringify-github-url --save

Usage

var github = require('stringify-github-url');

github

Stringify a GitHub project URL.

  • user {String}: Github user or org.
  • repo {String}: Project name
  • branch {String}: Optionally specify a branch.
  • returns: {String}

Example

github('assemble', 'verb');
//=> 'https://github.com/assemble/verb'

github('assemble', 'verb', 'v0.6.0');
//=> 'https://github.com/assemble/verb/tree/v0.6.0'

.tarball

Stringify a github tarball URL.

  • user {String}: The github user or org.
  • repo {String}: The repository
  • branch {String}: Branch, defaults to master.
  • returns: {String}

Example

github.tarball('assemble', 'verb');
//=> 'https://api.github.com/repos/assemble/verb/tarball'

.zipball

Stringify a github zipball URL.

  • user {String}: The github user or org.
  • repo {String}: The repository
  • branch {String}: Branch, defaults to master.
  • returns: {String}

Example

github.zipball('assemble', 'verb');
//=> 'https://api.github.com/repos/assemble/verb/zipball'

Running tests

Install dev dependencies.

npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright (c) 2015 Jon Schlinkert
Released under the MIT license


This file was generated by verb-cli on March 14, 2015.

FAQs

Last updated on 14 Mar 2015

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