Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

giturl

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

giturl - npm Package Compare versions

Comparing version
0.0.1
to
0.0.2
+5
-0
History.md
0.0.2 / 2014-02-27
==================
* fix #1 TypeError on not git url bug
0.0.1 / 2014-01-20

@@ -3,0 +8,0 @@ ==================

+10
-1

@@ -26,3 +26,8 @@ /**!

exports.parse = function parse(url) {
exports.parse = function parse(sourceURL) {
if (!sourceURL || typeof sourceURL !== 'string') {
return '';
}
var url = sourceURL;
if (url.indexOf('@') >= 0) {

@@ -34,2 +39,6 @@ url = url.replace(/^[^@]+@/, ''); // git@ || https://jpillora@ => ""

var item = RE.exec(url);
if (!item) {
return sourceURL;
}
var host = item[1];

@@ -36,0 +45,0 @@ var protocol = HTTPS_HOSTS[host] ? 'https' : 'http';

+1
-1
{
"name": "giturl",
"version": "0.0.1",
"version": "0.0.2",
"description": "Transfer git url to web url",

@@ -5,0 +5,0 @@ "main": "index.js",