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

normalize-git-url

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

normalize-git-url - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

.travis.yml

2

normalize-git-url.js

@@ -26,2 +26,4 @@ var url = require('url')

returnedUrl = u.replace(/^git\+(.*:[^:]+):(.*)/, '$1/$2')
} else if (u.match(/^git\+file/)) {
returnedUrl = u.replace(/^git\+/, '')
} else {

@@ -28,0 +30,0 @@ returnedUrl = u.replace(/^(?:git\+)?ssh:\/\//, '')

2

package.json
{
"name": "normalize-git-url",
"version": "3.0.1",
"version": "3.0.2",
"description": "Normalizes Git URLs. For npm, but you can use it too.",

@@ -5,0 +5,0 @@ "main": "normalize-git-url.js",

@@ -62,4 +62,11 @@ var test = require('tap').test

)
t.same(
normalize('git+file:///foo/bar.git'),
{ url: 'file:///foo/bar.git', branch: 'master' }
)
t.same(
normalize('git+file://C:\\Users\\hello\\testing.git#zkat/windows-files'),
{ url: 'file://C:\\Users\\hello\\testing.git', branch: 'zkat/windows-files'}
)
t.end()
})
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