Comparing version 1.1.0 to 1.1.1
/** | ||
* build-url - A small library that builds a URL given its components | ||
* @version v1.0.11 | ||
* @version v1.1.1 | ||
* @link https://github.com/steverydz/build-url#readme | ||
@@ -27,2 +27,6 @@ * @license MIT | ||
if(builtUrl && builtUrl[builtUrl.length - 1] === '/'){ | ||
builtUrl = builtUrl.slice(0, -1); | ||
} | ||
if (options) { | ||
@@ -29,0 +33,0 @@ if (options.path) { |
/** | ||
* build-url - A small library that builds a URL given its components | ||
* @version v1.0.11 | ||
* @version v1.1.1 | ||
* @link https://github.com/steverydz/build-url#readme | ||
* @license MIT | ||
*/ | ||
(function(){"use strict";var r=this,e=r.buildUrl,t=function(r,e){var t,u,o=[];if(null===r?u="":"object"==typeof r?(u="",e=r):u=r,e){if(e.path&&(u+=0===e.path.indexOf("/")?e.path:"/"+e.path),e.queryParams){for(t in e.queryParams)e.queryParams.hasOwnProperty(t)&&void 0!==e.queryParams[t]&&o.push(t+"="+e.queryParams[t]);u+="?"+o.join("&")}e.hash&&(u+="#"+e.hash)}return u};t.noConflict=function(){return r.buildUrl=e,t},"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=t),exports.buildUrl=t):r.buildUrl=t}).call(this); | ||
(function(){"use strict";var r=this,e=r.buildUrl,t=function(r,e){var t,u,o=[];if(null===r?u="":"object"==typeof r?(u="",e=r):u=r,u&&"/"===u[u.length-1]&&(u=u.slice(0,-1)),e){if(e.path&&(u+=0===e.path.indexOf("/")?e.path:"/"+e.path),e.queryParams){for(t in e.queryParams)e.queryParams.hasOwnProperty(t)&&void 0!==e.queryParams[t]&&o.push(t+"="+e.queryParams[t]);u+="?"+o.join("&")}e.hash&&(u+="#"+e.hash)}return u};t.noConflict=function(){return r.buildUrl=e,t},"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=t),exports.buildUrl=t):r.buildUrl=t}).call(this); |
{ | ||
"name": "build-url", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A small library that builds a URL given its components", | ||
@@ -5,0 +5,0 @@ "main": "./dist/build-url.js", |
@@ -194,2 +194,8 @@ describe('buildUrl', function () { | ||
}); | ||
it('should not show a double slash with domain', function () { | ||
expect(buildUrl('http://example.com/', { | ||
path: '/contact' | ||
})).toEqual('http://example.com/contact'); | ||
}); | ||
}); |
@@ -21,2 +21,6 @@ ;(function () { | ||
if(builtUrl && builtUrl[builtUrl.length - 1] === '/'){ | ||
builtUrl = builtUrl.slice(0, -1); | ||
} | ||
if (options) { | ||
@@ -23,0 +27,0 @@ if (options.path) { |
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
67075
337