Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hutson/parse-repository-url

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hutson/parse-repository-url

Parse repository URLs to extract, SCM platform, domain, user, and project information.

  • 5.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @hutson/parse-repository-url?

@hutson/parse-repository-url is an npm package designed to parse repository URLs into their component parts. This can be useful for extracting information such as the repository type, user, and project name from a given URL.

What are @hutson/parse-repository-url's main functionalities?

Parse repository URL

This feature allows you to parse a repository URL and extract its components. The code sample demonstrates how to use the package to parse a GitHub repository URL and log the parsed components.

const parseRepositoryUrl = require('@hutson/parse-repository-url');
const repoUrl = 'https://github.com/hutson/parse-repository-url';
const parsed = parseRepositoryUrl(repoUrl);
console.log(parsed);

Handle different repository URL formats

This feature demonstrates the package's ability to handle different repository URL formats, such as SSH URLs. The code sample shows how to parse an SSH URL and log the parsed components.

const parseRepositoryUrl = require('@hutson/parse-repository-url');
const repoUrl = 'git+ssh://git@github.com:hutson/parse-repository-url.git';
const parsed = parseRepositoryUrl(repoUrl);
console.log(parsed);

Other packages similar to @hutson/parse-repository-url

Keywords

FAQs

Package last updated on 16 Feb 2020

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