
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Parse a github repo url into an object of repo information and convert to several types of clone URL.
Utitiles to parse a github repo url to
$ npm install githuburl --save
var gu = require('githuburl');
var str = 'git@github.com:kaelzhang/node-githuburl.git'
// `str` could be either a scp-like syntax ssh url(as above), or http(s) url or something else.
gu(str);
Then we will get:
{
user: 'kaelzhang',
repo: 'node-githuburl',
ssh_user: 'git',
host: 'github.com',
// Actually the properties below are all getters,
// which you need not to concern about the performance.
http_href: 'http://github.com/kaelzhang/node-githuburl',
https_href: 'https://github.com/kaelzhang/node-githuburl',
http_clone_url: 'http://github.com/kaelzhang/node-githuburl.git',
https_clone_url: 'https://github.com/kaelzhang/node-githuburl.git',
ssh_clone_url: 'git@github.com:kaelzhang/node-githuburl.git',
git_clone_url: 'git://github.com/kaelzhang/node-githuburl.git'
}
Which you don't need to worry about.
var str = 'https://vip_account@abc.github.com/kaelzhang/node-githuburl.git';
var parsed = gu(str, true);
parsed.ssh_user;
// -> 'vip_account';
parsed.host;
// -> 'abc.github.com'
String
could be either a scp-like syntax ssh url(as above), or http(s) url or something else.Returns Object
the parsed object.
FAQs
Parse a github repo url into an object of repo information and convert to several types of clone URL.
The npm package githuburl receives a total of 253 weekly downloads. As such, githuburl popularity was classified as not popular.
We found that githuburl demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.