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.0.10 to 1.0.11

yarn.lock

2

bower.json

@@ -43,3 +43,3 @@ {

],
"version": "1.0.10"
"version": "1.0.11"
}
/**
* build-url - A small library that builds a URL given its components
* @version v1.0.10
* @version v1.0.11
* @link https://github.com/steverydz/build-url#readme

@@ -38,3 +38,4 @@ * @license MIT

for (key in options.queryParams) {
if (options.queryParams.hasOwnProperty(key)) {
if (options.queryParams.hasOwnProperty(key)
&& options.queryParams[key] !== void 0) {
queryString.push(key + '=' + options.queryParams[key]);

@@ -41,0 +42,0 @@ }

/**
* build-url - A small library that builds a URL given its components
* @version v1.0.10
* @version v1.0.11
* @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)&&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,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.0.10",
"version": "1.0.11",
"description": "A small library that builds a URL given its components",

@@ -5,0 +5,0 @@ "main": "./dist/build-url.js",

@@ -73,3 +73,3 @@ # build-url

buildUrl('http://example.com', {
path: 'about'
path: 'about',
hash: 'contact',

@@ -76,0 +76,0 @@ queryParams: {

@@ -185,2 +185,11 @@ describe('buildUrl', function () {

});
it('should not append a queryParam if it\'s undefined', function () {
expect(buildUrl('http://example.com', {
queryParams: {
foo: 'bar',
bar: void 0
}
})).toEqual('http://example.com?foo=bar');
});
});

@@ -32,3 +32,4 @@ ;(function () {

for (key in options.queryParams) {
if (options.queryParams.hasOwnProperty(key)) {
if (options.queryParams.hasOwnProperty(key)
&& options.queryParams[key] !== void 0) {
queryString.push(key + '=' + options.queryParams[key]);

@@ -35,0 +36,0 @@ }

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