Socket
Socket
Sign inDemoInstall

build-url

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

build-url - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

6

dist/build-url.js
/**
* 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) {

4

dist/build-url.min.js
/**
* 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) {

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