shelving 1.161.1 → 1.161.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/util/url.js +2 -2
package/package.json
CHANGED
package/util/url.js
CHANGED
|
@@ -94,7 +94,7 @@ export function withURLParam(url, key, value, caller = withURLParam) {
|
|
|
94
94
|
*/
|
|
95
95
|
export function withURLParams(url, params, caller = withURLParams) {
|
|
96
96
|
const input = requireURL(url);
|
|
97
|
-
const output =
|
|
97
|
+
const output = new URL(input);
|
|
98
98
|
for (const [key, str] of getURLEntries(params, caller))
|
|
99
99
|
output.searchParams.set(key, str);
|
|
100
100
|
return input.href === output.href ? input : output;
|
|
@@ -102,7 +102,7 @@ export function withURLParams(url, params, caller = withURLParams) {
|
|
|
102
102
|
/** Return a URL without one or more params (or same URL if no changes were made). */
|
|
103
103
|
export function omitURLParams(url, ...keys) {
|
|
104
104
|
const input = requireURL(url);
|
|
105
|
-
const output =
|
|
105
|
+
const output = new URL(input);
|
|
106
106
|
for (const key of keys)
|
|
107
107
|
output.searchParams.delete(key);
|
|
108
108
|
return input.href === output.href ? input : output;
|