New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github-repo-detail

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-repo-detail

Get owner and repo name from github SSH or HTTPs link

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by200%
Maintainers
1
Weekly downloads
 
Created
Source

github-repo-detail

Get owner and name of repository passed as SSH or HTTPs

Motivation

When dealing with octokit, it requres a proper owner and a repository name as params for it to fetch requests.
However, I have been in situation wherein I only have Github URL and have to perform certain task with octokit.

Usage

getDetails
import { getDetails, RepoDetails } from 'github-repo-detail';

// Accepts URL passed in form of HTTPs or SSH
const details: RepoDetails = getDetails(url_here);
console.log(details);
/* {
    owner: string,
    name: string
} */

That's it!

FAQs

Package last updated on 20 Oct 2022

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