mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-07 04:26:32 +08:00
These two packages had NPM advisories filed against them. Luckily, we can upgrade to versions where they are fixed. The upgrade of rollup-plugin-terser includes the upgrade to Terser 5. Looking at its changelog (https://github.com/terser/terser/blob/master/CHANGELOG.md#v500-beta0) we seem to not be affected. Our build also works as expected. DISABLE_THIRD_PARTY_CHECK=Update node modules R=petermarshall@chromium.org Change-Id: I6974a73d92a1a210b705246053be5c2af268605b Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2372148 Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Reviewed-by: Peter Marshall <petermarshall@chromium.org>
25 lines
505 B
JavaScript
25 lines
505 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Parse the given `qs`.
|
|
*
|
|
* @private
|
|
* @param {string} qs
|
|
* @return {Object<string, string>}
|
|
*/
|
|
module.exports = function parseQuery(qs) {
|
|
return qs
|
|
.replace('?', '')
|
|
.split('&')
|
|
.reduce(function(obj, pair) {
|
|
var i = pair.indexOf('=');
|
|
var key = pair.slice(0, i);
|
|
var val = pair.slice(++i);
|
|
|
|
// Due to how the URLSearchParams API treats spaces
|
|
obj[key] = decodeURIComponent(val.replace(/\+/g, '%20'));
|
|
|
|
return obj;
|
|
}, {});
|
|
};
|