Socket
Socket
Sign inDemoInstall

github-url-to-object

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-url-to-object

Extract username and repo name from various flavors of GitHub URLs


Version published
Weekly downloads
32K
decreased by-0.36%
Maintainers
1
Weekly downloads
 
Created
Source

github-url-to-object

Extract username and repo name from various flavors of GitHub URLs.

Installation

npm install github-url-to-object --save

Usage

require('github-url-to-object')('https://github.com/foo/bar.git');
// -> {user: 'foo', repo: 'git'}

Test

npm test

✓ extracts username and repo from github URL
✓ handles URLs without .git at the end
✓ handles http URLs
✓ handles https URLs
✓ handles git URLs
✓ handles shorthand user/repo paths

License

WTFPL

Keywords

FAQs

Package last updated on 25 Nov 2013

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc