Comparing version 1.1.0 to 1.1.1
@@ -5,3 +5,3 @@ var path = require('path'); | ||
var asArray = require('as-array'); | ||
var _isUrl = require('is-url'); | ||
var validUrl = require('valid-url'); | ||
@@ -12,3 +12,3 @@ var exports = module.exports = function () { | ||
return isUrl(paths[0]) | ||
return validUrl.isUri(paths[0]) | ||
? urlJoin.apply(urlJoin, paths) | ||
@@ -20,3 +20,3 @@ : path.join.apply(path, paths); | ||
return _isUrl(url) | ||
return validUrl.isUri(url) | ||
|| url === 'http://' | ||
@@ -30,4 +30,4 @@ || url === 'https://' | ||
return (p === undefined || p === null) | ||
? isUrl(paths[0]) ? '/' : path.sep | ||
? validUrl.isUri(paths[0]) ? '/' : path.sep | ||
: p; | ||
} |
{ | ||
"name": "join-path", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Join urls or system paths, even with undefined values", | ||
@@ -31,5 +31,5 @@ "main": "index.js", | ||
"as-array": "^2.0.0", | ||
"is-url": "^1.1.0", | ||
"valid-url": "^1", | ||
"url-join": "0.0.1" | ||
} | ||
} |
@@ -23,1 +23,6 @@ var test = require('tape'); | ||
}); | ||
test('joins a url without only tld', function (t) { | ||
t.equal(join('http://test:3002/api/v1', '/some/path'), 'http://test:3002/api/v1/some/path', 'tld only with port'); | ||
t.end(); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4500
40
+ Addedvalid-url@^1
+ Addedvalid-url@1.0.9(transitive)
- Removedis-url@^1.1.0
- Removedis-url@1.2.4(transitive)