New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@turbox3d/shared

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turbox3d/shared - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

14

es/common.js

@@ -143,2 +143,16 @@ import _typeof from "@babel/runtime/helpers/esm/typeof";

});
}
export function updateQueryStringParameter(url, key, value) {
if (!value) {
return url;
}
var re = new RegExp("([?&])".concat(key, "=.*?(&|$)"), 'i');
var separator = url.indexOf('?') !== -1 ? '&' : '?';
if (url.match(re)) {
return url.replace(re, "$1".concat(key, "=").concat(value, "$2"));
}
return "".concat(url).concat(separator).concat(key, "=").concat(value);
}

@@ -24,2 +24,3 @@ "use strict";

exports.sortBy = sortBy;
exports.updateQueryStringParameter = updateQueryStringParameter;

@@ -193,2 +194,17 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));

});
}
function updateQueryStringParameter(url, key, value) {
if (!value) {
return url;
}
var re = new RegExp("([?&])".concat(key, "=.*?(&|$)"), 'i');
var separator = url.indexOf('?') !== -1 ? '&' : '?';
if (url.match(re)) {
return url.replace(re, "$1".concat(key, "=").concat(value, "$2"));
}
return "".concat(url).concat(separator).concat(key, "=").concat(value);
}

4

package.json
{
"name": "@turbox3d/shared",
"version": "1.1.1",
"version": "1.1.2",
"description": "turbox shared internal utility",

@@ -65,3 +65,3 @@ "main": "./lib/index.js",

},
"gitHead": "8bab9aea3963d03bf57b3d143e05d8c7d02fb8a1"
"gitHead": "87982e50da3997de90c0e4272db3c0007ddb62c9"
}

@@ -151,1 +151,13 @@ import { isSymbol } from './lang';

}
export function updateQueryStringParameter(url: string, key: string, value: string) {
if (!value) {
return url;
}
const re = new RegExp(`([?&])${key}=.*?(&|$)`, 'i');
const separator = url.indexOf('?') !== -1 ? '&' : '?';
if (url.match(re)) {
return url.replace(re, `$1${key}=${value}$2`);
}
return `${url}${separator}${key}=${value}`;
}

@@ -25,1 +25,2 @@ export declare function isObject(value: any): boolean;

export declare function loadJSON(url: string): Promise<any>;
export declare function updateQueryStringParameter(url: string, key: string, value: string): string;
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