Skip to content

Commit

Permalink
Upgrade dependencies (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamVerschueren committed Dec 20, 2022
1 parent 2e2fb6e commit 20cc109
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
14 changes: 12 additions & 2 deletions base.js
Expand Up @@ -353,7 +353,13 @@ export function parse(query, options) {
continue;
}

let [key, value] = splitOnFirst(options.decode ? parameter.replace(/\+/g, ' ') : parameter, '=');
const parameter_ = options.decode ? parameter.replace(/\+/g, ' ') : parameter;

let [key, value] = splitOnFirst(parameter_, '=');

if (key === undefined) {
key = parameter_;
}

// Missing `=` should be `null`:
// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
Expand Down Expand Up @@ -454,7 +460,11 @@ export function parseUrl(url, options) {
...options,
};

const [url_, hash] = splitOnFirst(url, '#');
let [url_, hash] = splitOnFirst(url, '#');

if (url_ === undefined) {
url_ = url;
}

return {
url: url_?.split('?')?.[0] ?? '',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -45,9 +45,9 @@
"filter"
],
"dependencies": {
"decode-uri-component": "^0.2.2",
"decode-uri-component": "^0.4.1",
"filter-obj": "^5.1.0",
"split-on-first": "^1.0.0"
"split-on-first": "^3.0.0"
},
"devDependencies": {
"ava": "^5.1.0",
Expand Down

0 comments on commit 20cc109

Please sign in to comment.