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

url-join

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

url-join - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

2

bower.json
{
"name": "url-join",
"version": "2.0.2",
"version": "2.0.4",
"homepage": "https://github.com/jfromaniello/url-join",

@@ -5,0 +5,0 @@ "authors": [

@@ -13,3 +13,3 @@ (function (name, context, definition) {

var resultArray = [];
// If the first part is a plain protocol, we combine it with the next part.

@@ -27,6 +27,11 @@ if (strArray[0].match(/:\/*$/) && strArray.length > 1) {

}
for (var i = 0; i < strArray.length; i++) {
var component = strArray[i];
if (typeof component !== 'string') {
component = component && component.toString() || '';
}
if (i > 0) {

@@ -43,7 +48,7 @@ // Removing the starting slashes for each component but the first.

}
resultArray.push(component);
}
var str = resultArray.join('/');

@@ -71,3 +76,3 @@ // Each input component is now separated by a single slash except the possible first plain protocol part.

}
return normalize([].slice.call(input), options);

@@ -74,0 +79,0 @@ };

{
"name": "url-join",
"version": "2.0.3",
"version": "2.0.4",
"description": "Join urls and normalize as in path.join.",

@@ -23,2 +23,2 @@ "main": "lib/url-join.js",

}
}
}

@@ -95,3 +95,3 @@ var urljoin = require('../lib/url-join');

});
it('should merge just a simple path without URL correctly', function() {

@@ -102,2 +102,7 @@ urljoin('/', 'test')

it('should merge just a simple path without URL correctly', function() {
urljoin('/', 1)
.should.eql('/1');
});
it('should merge slashes in protocol correctly', function () {

@@ -104,0 +109,0 @@ urljoin('http://example.org', 'a')

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