summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/query-string
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/query-string')
-rw-r--r--deps/npm/node_modules/query-string/index.js184
-rw-r--r--deps/npm/node_modules/query-string/node_modules/decode-uri-component/index.js94
-rw-r--r--deps/npm/node_modules/query-string/node_modules/decode-uri-component/license21
-rw-r--r--deps/npm/node_modules/query-string/node_modules/decode-uri-component/package.json69
-rw-r--r--deps/npm/node_modules/query-string/node_modules/decode-uri-component/readme.md70
-rw-r--r--deps/npm/node_modules/query-string/node_modules/object-assign/index.js90
-rw-r--r--deps/npm/node_modules/query-string/node_modules/object-assign/license21
-rw-r--r--deps/npm/node_modules/query-string/node_modules/object-assign/package.json74
-rw-r--r--deps/npm/node_modules/query-string/node_modules/object-assign/readme.md61
-rw-r--r--deps/npm/node_modules/query-string/node_modules/strict-uri-encode/index.js6
-rw-r--r--deps/npm/node_modules/query-string/node_modules/strict-uri-encode/license21
-rw-r--r--deps/npm/node_modules/query-string/node_modules/strict-uri-encode/package.json62
-rw-r--r--deps/npm/node_modules/query-string/node_modules/strict-uri-encode/readme.md40
-rw-r--r--deps/npm/node_modules/query-string/package.json45
-rw-r--r--deps/npm/node_modules/query-string/readme.md51
15 files changed, 170 insertions, 739 deletions
diff --git a/deps/npm/node_modules/query-string/index.js b/deps/npm/node_modules/query-string/index.js
index 7da4fead5f..523c87fdfb 100644
--- a/deps/npm/node_modules/query-string/index.js
+++ b/deps/npm/node_modules/query-string/index.js
@@ -1,52 +1,49 @@
'use strict';
-var strictUriEncode = require('strict-uri-encode');
-var objectAssign = require('object-assign');
-var decodeComponent = require('decode-uri-component');
+const strictUriEncode = require('strict-uri-encode');
+const decodeComponent = require('decode-uri-component');
-function encoderForArrayFormat(opts) {
- switch (opts.arrayFormat) {
+function encoderForArrayFormat(options) {
+ switch (options.arrayFormat) {
case 'index':
- return function (key, value, index) {
+ return (key, value, index) => {
return value === null ? [
- encode(key, opts),
+ encode(key, options),
'[',
index,
']'
].join('') : [
- encode(key, opts),
+ encode(key, options),
'[',
- encode(index, opts),
+ encode(index, options),
']=',
- encode(value, opts)
+ encode(value, options)
].join('');
};
-
case 'bracket':
- return function (key, value) {
- return value === null ? encode(key, opts) : [
- encode(key, opts),
+ return (key, value) => {
+ return value === null ? [encode(key, options), '[]'].join('') : [
+ encode(key, options),
'[]=',
- encode(value, opts)
+ encode(value, options)
].join('');
};
-
default:
- return function (key, value) {
- return value === null ? encode(key, opts) : [
- encode(key, opts),
+ return (key, value) => {
+ return value === null ? encode(key, options) : [
+ encode(key, options),
'=',
- encode(value, opts)
+ encode(value, options)
].join('');
};
}
}
-function parserForArrayFormat(opts) {
- var result;
+function parserForArrayFormat(options) {
+ let result;
- switch (opts.arrayFormat) {
+ switch (options.arrayFormat) {
case 'index':
- return function (key, value, accumulator) {
+ return (key, value, accumulator) => {
result = /\[(\d*)\]$/.exec(key);
key = key.replace(/\[\d*\]$/, '');
@@ -62,25 +59,25 @@ function parserForArrayFormat(opts) {
accumulator[key][result[1]] = value;
};
-
case 'bracket':
- return function (key, value, accumulator) {
+ return (key, value, accumulator) => {
result = /(\[\])$/.exec(key);
key = key.replace(/\[\]$/, '');
if (!result) {
accumulator[key] = value;
return;
- } else if (accumulator[key] === undefined) {
+ }
+
+ if (accumulator[key] === undefined) {
accumulator[key] = [value];
return;
}
accumulator[key] = [].concat(accumulator[key], value);
};
-
default:
- return function (key, value, accumulator) {
+ return (key, value, accumulator) => {
if (accumulator[key] === undefined) {
accumulator[key] = value;
return;
@@ -91,9 +88,17 @@ function parserForArrayFormat(opts) {
}
}
-function encode(value, opts) {
- if (opts.encode) {
- return opts.strict ? strictUriEncode(value) : encodeURIComponent(value);
+function encode(value, options) {
+ if (options.encode) {
+ return options.strict ? strictUriEncode(value) : encodeURIComponent(value);
+ }
+
+ return value;
+}
+
+function decode(value, options) {
+ if (options.decode) {
+ return decodeComponent(value);
}
return value;
@@ -102,109 +107,116 @@ function encode(value, opts) {
function keysSorter(input) {
if (Array.isArray(input)) {
return input.sort();
- } else if (typeof input === 'object') {
- return keysSorter(Object.keys(input)).sort(function (a, b) {
- return Number(a) - Number(b);
- }).map(function (key) {
- return input[key];
- });
+ }
+
+ if (typeof input === 'object') {
+ return keysSorter(Object.keys(input))
+ .sort((a, b) => Number(a) - Number(b))
+ .map(key => input[key]);
}
return input;
}
-exports.extract = function (str) {
- var queryStart = str.indexOf('?');
+function extract(input) {
+ const queryStart = input.indexOf('?');
if (queryStart === -1) {
return '';
}
- return str.slice(queryStart + 1);
-};
+ return input.slice(queryStart + 1);
+}
-exports.parse = function (str, opts) {
- opts = objectAssign({arrayFormat: 'none'}, opts);
+function parse(input, options) {
+ options = Object.assign({decode: true, arrayFormat: 'none'}, options);
- var formatter = parserForArrayFormat(opts);
+ const formatter = parserForArrayFormat(options);
// Create an object with no prototype
- // https://github.com/sindresorhus/query-string/issues/47
- var ret = Object.create(null);
+ const ret = Object.create(null);
- if (typeof str !== 'string') {
+ if (typeof input !== 'string') {
return ret;
}
- str = str.trim().replace(/^[?#&]/, '');
+ input = input.trim().replace(/^[?#&]/, '');
- if (!str) {
+ if (!input) {
return ret;
}
- str.split('&').forEach(function (param) {
- var parts = param.replace(/\+/g, ' ').split('=');
- // Firefox (pre 40) decodes `%3D` to `=`
- // https://github.com/sindresorhus/query-string/pull/37
- var key = parts.shift();
- var val = parts.length > 0 ? parts.join('=') : undefined;
+ for (const param of input.split('&')) {
+ let [key, value] = param.replace(/\+/g, ' ').split('=');
- // missing `=` should be `null`:
+ // Missing `=` should be `null`:
// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
- val = val === undefined ? null : decodeComponent(val);
+ value = value === undefined ? null : decode(value, options);
- formatter(decodeComponent(key), val, ret);
- });
+ formatter(decode(key, options), value, ret);
+ }
- return Object.keys(ret).sort().reduce(function (result, key) {
- var val = ret[key];
- if (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) {
+ return Object.keys(ret).sort().reduce((result, key) => {
+ const value = ret[key];
+ if (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {
// Sort object keys, not values
- result[key] = keysSorter(val);
+ result[key] = keysSorter(value);
} else {
- result[key] = val;
+ result[key] = value;
}
return result;
}, Object.create(null));
-};
+}
+
+exports.extract = extract;
+exports.parse = parse;
-exports.stringify = function (obj, opts) {
- var defaults = {
+exports.stringify = (obj, options) => {
+ const defaults = {
encode: true,
strict: true,
arrayFormat: 'none'
};
- opts = objectAssign(defaults, opts);
+ options = Object.assign(defaults, options);
- var formatter = encoderForArrayFormat(opts);
+ if (options.sort === false) {
+ options.sort = () => {};
+ }
+
+ const formatter = encoderForArrayFormat(options);
- return obj ? Object.keys(obj).sort().map(function (key) {
- var val = obj[key];
+ return obj ? Object.keys(obj).sort(options.sort).map(key => {
+ const value = obj[key];
- if (val === undefined) {
+ if (value === undefined) {
return '';
}
- if (val === null) {
- return encode(key, opts);
+ if (value === null) {
+ return encode(key, options);
}
- if (Array.isArray(val)) {
- var result = [];
+ if (Array.isArray(value)) {
+ const result = [];
- val.slice().forEach(function (val2) {
- if (val2 === undefined) {
- return;
+ for (const value2 of value.slice()) {
+ if (value2 === undefined) {
+ continue;
}
- result.push(formatter(key, val2, result.length));
- });
+ result.push(formatter(key, value2, result.length));
+ }
return result.join('&');
}
- return encode(key, opts) + '=' + encode(val, opts);
- }).filter(function (x) {
- return x.length > 0;
- }).join('&') : '';
+ return encode(key, options) + '=' + encode(value, options);
+ }).filter(x => x.length > 0).join('&') : '';
+};
+
+exports.parseUrl = (input, options) => {
+ return {
+ url: input.split('?')[0] || '',
+ query: parse(extract(input), options)
+ };
};
diff --git a/deps/npm/node_modules/query-string/node_modules/decode-uri-component/index.js b/deps/npm/node_modules/query-string/node_modules/decode-uri-component/index.js
deleted file mode 100644
index 691499b0e8..0000000000
--- a/deps/npm/node_modules/query-string/node_modules/decode-uri-component/index.js
+++ /dev/null
@@ -1,94 +0,0 @@
-'use strict';
-var token = '%[a-f0-9]{2}';
-var singleMatcher = new RegExp(token, 'gi');
-var multiMatcher = new RegExp('(' + token + ')+', 'gi');
-
-function decodeComponents(components, split) {
- try {
- // Try to decode the entire string first
- return decodeURIComponent(components.join(''));
- } catch (err) {
- // Do nothing
- }
-
- if (components.length === 1) {
- return components;
- }
-
- split = split || 1;
-
- // Split the array in 2 parts
- var left = components.slice(0, split);
- var right = components.slice(split);
-
- return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));
-}
-
-function decode(input) {
- try {
- return decodeURIComponent(input);
- } catch (err) {
- var tokens = input.match(singleMatcher);
-
- for (var i = 1; i < tokens.length; i++) {
- input = decodeComponents(tokens, i).join('');
-
- tokens = input.match(singleMatcher);
- }
-
- return input;
- }
-}
-
-function customDecodeURIComponent(input) {
- // Keep track of all the replacements and prefill the map with the `BOM`
- var replaceMap = {
- '%FE%FF': '\uFFFD\uFFFD',
- '%FF%FE': '\uFFFD\uFFFD'
- };
-
- var match = multiMatcher.exec(input);
- while (match) {
- try {
- // Decode as big chunks as possible
- replaceMap[match[0]] = decodeURIComponent(match[0]);
- } catch (err) {
- var result = decode(match[0]);
-
- if (result !== match[0]) {
- replaceMap[match[0]] = result;
- }
- }
-
- match = multiMatcher.exec(input);
- }
-
- // Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else
- replaceMap['%C2'] = '\uFFFD';
-
- var entries = Object.keys(replaceMap);
-
- for (var i = 0; i < entries.length; i++) {
- // Replace all decoded components
- var key = entries[i];
- input = input.replace(new RegExp(key, 'g'), replaceMap[key]);
- }
-
- return input;
-}
-
-module.exports = function (encodedURI) {
- if (typeof encodedURI !== 'string') {
- throw new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');
- }
-
- try {
- encodedURI = encodedURI.replace(/\+/g, ' ');
-
- // Try the built in decoder first
- return decodeURIComponent(encodedURI);
- } catch (err) {
- // Fallback to a more advanced decoder
- return customDecodeURIComponent(encodedURI);
- }
-};
diff --git a/deps/npm/node_modules/query-string/node_modules/decode-uri-component/license b/deps/npm/node_modules/query-string/node_modules/decode-uri-component/license
deleted file mode 100644
index 78b08554a3..0000000000
--- a/deps/npm/node_modules/query-string/node_modules/decode-uri-component/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sam Verschueren <sam.verschueren@gmail.com> (github.com/SamVerschueren)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/query-string/node_modules/decode-uri-component/package.json b/deps/npm/node_modules/query-string/node_modules/decode-uri-component/package.json
deleted file mode 100644
index a5fe214ca1..0000000000
--- a/deps/npm/node_modules/query-string/node_modules/decode-uri-component/package.json
+++ /dev/null
@@ -1,69 +0,0 @@
-{
- "_from": "decode-uri-component@^0.2.0",
- "_id": "decode-uri-component@0.2.0",
- "_inBundle": false,
- "_integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
- "_location": "/query-string/decode-uri-component",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "decode-uri-component@^0.2.0",
- "name": "decode-uri-component",
- "escapedName": "decode-uri-component",
- "rawSpec": "^0.2.0",
- "saveSpec": null,
- "fetchSpec": "^0.2.0"
- },
- "_requiredBy": [
- "/query-string"
- ],
- "_resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
- "_shasum": "eb3913333458775cb84cd1a1fae062106bb87545",
- "_spec": "decode-uri-component@^0.2.0",
- "_where": "/Users/rebecca/code/npm/node_modules/query-string",
- "author": {
- "name": "Sam Verschueren",
- "email": "sam.verschueren@gmail.com",
- "url": "github.com/SamVerschueren"
- },
- "bugs": {
- "url": "https://github.com/SamVerschueren/decode-uri-component/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "A better decodeURIComponent",
- "devDependencies": {
- "ava": "^0.17.0",
- "coveralls": "^2.13.1",
- "nyc": "^10.3.2",
- "xo": "^0.16.0"
- },
- "engines": {
- "node": ">=0.10"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/SamVerschueren/decode-uri-component#readme",
- "keywords": [
- "decode",
- "uri",
- "component",
- "decodeuricomponent",
- "components",
- "decoder",
- "url"
- ],
- "license": "MIT",
- "name": "decode-uri-component",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/SamVerschueren/decode-uri-component.git"
- },
- "scripts": {
- "coveralls": "nyc report --reporter=text-lcov | coveralls",
- "test": "xo && nyc ava"
- },
- "version": "0.2.0"
-}
diff --git a/deps/npm/node_modules/query-string/node_modules/decode-uri-component/readme.md b/deps/npm/node_modules/query-string/node_modules/decode-uri-component/readme.md
deleted file mode 100644
index 795c87ff77..0000000000
--- a/deps/npm/node_modules/query-string/node_modules/decode-uri-component/readme.md
+++ /dev/null
@@ -1,70 +0,0 @@
-# decode-uri-component
-
-[![Build Status](https://travis-ci.org/SamVerschueren/decode-uri-component.svg?branch=master)](https://travis-ci.org/SamVerschueren/decode-uri-component) [![Coverage Status](https://coveralls.io/repos/SamVerschueren/decode-uri-component/badge.svg?branch=master&service=github)](https://coveralls.io/github/SamVerschueren/decode-uri-component?branch=master)
-
-> A better [decodeURIComponent](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent)
-
-
-## Why?
-
-- Decodes `+` to a space.
-- Converts the [BOM](https://en.wikipedia.org/wiki/Byte_order_mark) to a [replacement character](https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character) `�`.
-- Does not throw with invalid encoded input.
-- Decodes as much of the string as possible.
-
-
-## Install
-
-```
-$ npm install --save decode-uri-component
-```
-
-
-## Usage
-
-```js
-const decodeUriComponent = require('decode-uri-component');
-
-decodeUriComponent('%25');
-//=> '%'
-
-decodeUriComponent('%');
-//=> '%'
-
-decodeUriComponent('st%C3%A5le');
-//=> 'ståle'
-
-decodeUriComponent('%st%C3%A5le%');
-//=> '%ståle%'
-
-decodeUriComponent('%%7Bst%C3%A5le%7D%');
-//=> '%{ståle}%'
-
-decodeUriComponent('%7B%ab%%7C%de%%7D');
-//=> '{%ab%|%de%}'
-
-decodeUriComponent('%FE%FF');
-//=> '\uFFFD\uFFFD'
-
-decodeUriComponent('%C2');
-//=> '\uFFFD'
-
-decodeUriComponent('%C2%B5');
-//=> 'µ'
-```
-
-
-## API
-
-### decodeUriComponent(encodedURI)
-
-#### encodedURI
-
-Type: `string`
-
-An encoded component of a Uniform Resource Identifier.
-
-
-## License
-
-MIT © [Sam Verschueren](https://github.com/SamVerschueren)
diff --git a/deps/npm/node_modules/query-string/node_modules/object-assign/index.js b/deps/npm/node_modules/query-string/node_modules/object-assign/index.js
deleted file mode 100644
index 0930cf8890..0000000000
--- a/deps/npm/node_modules/query-string/node_modules/object-assign/index.js
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-object-assign
-(c) Sindre Sorhus
-@license MIT
-*/
-
-'use strict';
-/* eslint-disable no-unused-vars */
-var getOwnPropertySymbols = Object.getOwnPropertySymbols;
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-function toObject(val) {
- if (val === null || val === undefined) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
-
- return Object(val);
-}
-
-function shouldUseNative() {
- try {
- if (!Object.assign) {
- return false;
- }
-
- // Detect buggy property enumeration order in older V8 versions.
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
- test1[5] = 'de';
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test2 = {};
- for (var i = 0; i < 10; i++) {
- test2['_' + String.fromCharCode(i)] = i;
- }
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
- return test2[n];
- });
- if (order2.join('') !== '0123456789') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test3 = {};
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
- test3[letter] = letter;
- });
- if (Object.keys(Object.assign({}, test3)).join('') !==
- 'abcdefghijklmnopqrst') {
- return false;
- }
-
- return true;
- } catch (err) {
- // We don't expect any of the above to throw, but better to be safe.
- return false;
- }
-}
-
-module.exports = shouldUseNative() ? Object.assign : function (target, source) {
- var from;
- var to = toObject(target);
- var symbols;
-
- for (var s = 1; s < arguments.length; s++) {
- from = Object(arguments[s]);
-
- for (var key in from) {
- if (hasOwnProperty.call(from, key)) {
- to[key] = from[key];
- }
- }
-
- if (getOwnPropertySymbols) {
- symbols = getOwnPropertySymbols(from);
- for (var i = 0; i < symbols.length; i++) {
- if (propIsEnumerable.call(from, symbols[i])) {
- to[symbols[i]] = from[symbols[i]];
- }
- }
- }
- }
-
- return to;
-};
diff --git a/deps/npm/node_modules/query-string/node_modules/object-assign/license b/deps/npm/node_modules/query-string/node_modules/object-assign/license
deleted file mode 100644
index 654d0bfe94..0000000000
--- a/deps/npm/node_modules/query-string/node_modules/object-assign/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/query-string/node_modules/object-assign/package.json b/deps/npm/node_modules/query-string/node_modules/object-assign/package.json
deleted file mode 100644
index 80ff3c78c4..0000000000
--- a/deps/npm/node_modules/query-string/node_modules/object-assign/package.json
+++ /dev/null
@@ -1,74 +0,0 @@
-{
- "_from": "object-assign@^4.1.0",
- "_id": "object-assign@4.1.1",
- "_inBundle": false,
- "_integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
- "_location": "/query-string/object-assign",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "object-assign@^4.1.0",
- "name": "object-assign",
- "escapedName": "object-assign",
- "rawSpec": "^4.1.0",
- "saveSpec": null,
- "fetchSpec": "^4.1.0"
- },
- "_requiredBy": [
- "/query-string"
- ],
- "_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
- "_shasum": "2109adc7965887cfc05cbbd442cac8bfbb360863",
- "_spec": "object-assign@^4.1.0",
- "_where": "/Users/rebecca/code/npm/node_modules/query-string",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "bugs": {
- "url": "https://github.com/sindresorhus/object-assign/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "ES2015 `Object.assign()` ponyfill",
- "devDependencies": {
- "ava": "^0.16.0",
- "lodash": "^4.16.4",
- "matcha": "^0.7.0",
- "xo": "^0.16.0"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/sindresorhus/object-assign#readme",
- "keywords": [
- "object",
- "assign",
- "extend",
- "properties",
- "es2015",
- "ecmascript",
- "harmony",
- "ponyfill",
- "prollyfill",
- "polyfill",
- "shim",
- "browser"
- ],
- "license": "MIT",
- "name": "object-assign",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/sindresorhus/object-assign.git"
- },
- "scripts": {
- "bench": "matcha bench.js",
- "test": "xo && ava"
- },
- "version": "4.1.1"
-}
diff --git a/deps/npm/node_modules/query-string/node_modules/object-assign/readme.md b/deps/npm/node_modules/query-string/node_modules/object-assign/readme.md
deleted file mode 100644
index 1be09d35c7..0000000000
--- a/deps/npm/node_modules/query-string/node_modules/object-assign/readme.md
+++ /dev/null
@@ -1,61 +0,0 @@
-# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign)
-
-> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com)
-
-
-## Use the built-in
-
-Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari),
-support `Object.assign()` :tada:. If you target only those environments, then by all
-means, use `Object.assign()` instead of this package.
-
-
-## Install
-
-```
-$ npm install --save object-assign
-```
-
-
-## Usage
-
-```js
-const objectAssign = require('object-assign');
-
-objectAssign({foo: 0}, {bar: 1});
-//=> {foo: 0, bar: 1}
-
-// multiple sources
-objectAssign({foo: 0}, {bar: 1}, {baz: 2});
-//=> {foo: 0, bar: 1, baz: 2}
-
-// overwrites equal keys
-objectAssign({foo: 0}, {foo: 1}, {foo: 2});
-//=> {foo: 2}
-
-// ignores null and undefined sources
-objectAssign({foo: 0}, null, {bar: 1}, undefined);
-//=> {foo: 0, bar: 1}
-```
-
-
-## API
-
-### objectAssign(target, [source, ...])
-
-Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
-
-
-## Resources
-
-- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
-
-
-## Related
-
-- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()`
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/index.js b/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/index.js
deleted file mode 100644
index 414de96c51..0000000000
--- a/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-'use strict';
-module.exports = function (str) {
- return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
- return '%' + c.charCodeAt(0).toString(16).toUpperCase();
- });
-};
diff --git a/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/license b/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/license
deleted file mode 100644
index e0e915823d..0000000000
--- a/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Kevin Mårtensson <kevinmartensson@gmail.com> (github.com/kevva)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/package.json b/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/package.json
deleted file mode 100644
index 344b83ab40..0000000000
--- a/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/package.json
+++ /dev/null
@@ -1,62 +0,0 @@
-{
- "_from": "strict-uri-encode@^1.0.0",
- "_id": "strict-uri-encode@1.1.0",
- "_inBundle": false,
- "_integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=",
- "_location": "/query-string/strict-uri-encode",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "strict-uri-encode@^1.0.0",
- "name": "strict-uri-encode",
- "escapedName": "strict-uri-encode",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/query-string"
- ],
- "_resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
- "_shasum": "279b225df1d582b1f54e65addd4352e18faa0713",
- "_spec": "strict-uri-encode@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/query-string",
- "author": {
- "name": "Kevin Mårtensson",
- "email": "kevinmartensson@gmail.com",
- "url": "github.com/kevva"
- },
- "bugs": {
- "url": "https://github.com/kevva/strict-uri-encode/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "A stricter URI encode adhering to RFC 3986",
- "devDependencies": {
- "ava": "^0.0.4"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/kevva/strict-uri-encode#readme",
- "keywords": [
- "component",
- "encode",
- "RFC3986",
- "uri"
- ],
- "license": "MIT",
- "name": "strict-uri-encode",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/kevva/strict-uri-encode.git"
- },
- "scripts": {
- "test": "node test.js"
- },
- "version": "1.1.0"
-}
diff --git a/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/readme.md b/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/readme.md
deleted file mode 100644
index b2407903a9..0000000000
--- a/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/readme.md
+++ /dev/null
@@ -1,40 +0,0 @@
-# strict-uri-encode [![Build Status](https://travis-ci.org/kevva/strict-uri-encode.svg?branch=master)](https://travis-ci.org/kevva/strict-uri-encode)
-
-> A stricter URI encode adhering to [RFC 3986](http://tools.ietf.org/html/rfc3986)
-
-
-## Install
-
-```
-$ npm install --save strict-uri-encode
-```
-
-
-## Usage
-
-```js
-var strictUriEncode = require('strict-uri-encode');
-
-strictUriEncode('unicorn!foobar')
-//=> 'unicorn%21foobar'
-
-strictUriEncode('unicorn*foobar')
-//=> 'unicorn%2Afoobar'
-```
-
-
-## API
-
-### strictUriEncode(string)
-
-#### string
-
-*Required*
-Type: `string`, `number`
-
-String to URI encode.
-
-
-## License
-
-MIT © [Kevin Mårtensson](http://github.com/kevva)
diff --git a/deps/npm/node_modules/query-string/package.json b/deps/npm/node_modules/query-string/package.json
index 00bf7c58df..d29777ef1c 100644
--- a/deps/npm/node_modules/query-string/package.json
+++ b/deps/npm/node_modules/query-string/package.json
@@ -1,28 +1,32 @@
{
- "_from": "query-string@5.0.1",
- "_id": "query-string@5.0.1",
+ "_args": [
+ [
+ "query-string@6.1.0",
+ "/Users/rebecca/code/npm"
+ ]
+ ],
+ "_from": "query-string@6.1.0",
+ "_id": "query-string@6.1.0",
"_inBundle": false,
- "_integrity": "sha512-aM+MkQClojlNiKkO09tiN2Fv8jM/L7GWIjG2liWeKljlOdOPNWr+bW3KQ+w5V/uKprpezC7fAsAMsJtJ+2rLKA==",
+ "_integrity": "sha512-pNB/Gr8SA8ff8KpUFM36o/WFAlthgaThka5bV19AD9PNTH20Pwq5Zxodif2YyHwrctp6SkL4GqlOot0qR/wGaw==",
"_location": "/query-string",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
- "raw": "query-string@5.0.1",
+ "raw": "query-string@6.1.0",
"name": "query-string",
"escapedName": "query-string",
- "rawSpec": "5.0.1",
+ "rawSpec": "6.1.0",
"saveSpec": null,
- "fetchSpec": "5.0.1"
+ "fetchSpec": "6.1.0"
},
"_requiredBy": [
- "#USER",
"/"
],
- "_resolved": "https://registry.npmjs.org/query-string/-/query-string-5.0.1.tgz",
- "_shasum": "6e2b86fe0e08aef682ecbe86e85834765402bd88",
- "_spec": "query-string@5.0.1",
- "_where": "/Users/zkat/Documents/code/npm",
+ "_resolved": "https://registry.npmjs.org/query-string/-/query-string-6.1.0.tgz",
+ "_spec": "6.1.0",
+ "_where": "/Users/rebecca/code/npm",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
@@ -31,20 +35,19 @@
"bugs": {
"url": "https://github.com/sindresorhus/query-string/issues"
},
- "bundleDependencies": false,
"dependencies": {
"decode-uri-component": "^0.2.0",
- "object-assign": "^4.1.0",
- "strict-uri-encode": "^1.0.0"
+ "strict-uri-encode": "^2.0.0"
},
- "deprecated": false,
"description": "Parse and stringify URL query strings",
"devDependencies": {
- "ava": "^0.17.0",
- "xo": "^0.16.0"
+ "ava": "*",
+ "deep-equal": "^1.0.1",
+ "fast-check": "^1.0.1",
+ "xo": "*"
},
"engines": {
- "node": ">=0.10.0"
+ "node": ">=6"
},
"files": [
"index.js"
@@ -59,11 +62,11 @@
"param",
"parameter",
"url",
- "uri",
"parse",
"stringify",
"encode",
- "decode"
+ "decode",
+ "searchparams"
],
"license": "MIT",
"name": "query-string",
@@ -74,5 +77,5 @@
"scripts": {
"test": "xo && ava"
},
- "version": "5.0.1"
+ "version": "6.1.0"
}
diff --git a/deps/npm/node_modules/query-string/readme.md b/deps/npm/node_modules/query-string/readme.md
index 8d2148c9d1..f81bd6aea2 100644
--- a/deps/npm/node_modules/query-string/readme.md
+++ b/deps/npm/node_modules/query-string/readme.md
@@ -1,10 +1,10 @@
# query-string [![Build Status](https://travis-ci.org/sindresorhus/query-string.svg?branch=master)](https://travis-ci.org/sindresorhus/query-string)
-> Parse and stringify URL [query strings](http://en.wikipedia.org/wiki/Query_string)
+> Parse and stringify URL [query strings](https://en.wikipedia.org/wiki/Query_string)
---
-<p align="center"><b>🔥 Want to strengthen your core JavaScript skills and master ES6?</b><br>I would personally recommend this awesome <a href="https://ES6.io/friend/AWESOME">ES6 course</a> by Wes Bos. You might also like his <a href="https://ReactForBeginners.com/friend/AWESOME">React course</a>.</p>
+<p align="center"><b>🔥 Want to strengthen your core JavaScript skills and master ES6?</b><br>I would personally recommend this awesome <a href="https://ES6.io/friend/AWESOME">ES6 course</a> by Wes Bos.<br>Also check out his <a href="https://LearnNode.com/friend/AWESOME">Node.js</a>, <a href="https://ReactForBeginners.com/friend/AWESOME">React</a>, <a href="https://SublimeTextBook.com/friend/AWESOME">Sublime</a> courses.</p>
---
@@ -15,6 +15,12 @@
$ npm install query-string
```
+This module targets Node.js 6 or later and the latest version of Chrome, Firefox, and Safari. If you want support for older browsers, use version 5: `npm install query-string@5`.
+
+<a href="https://www.patreon.com/sindresorhus">
+ <img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
+</a>
+
## Usage
@@ -56,7 +62,12 @@ Parse a query string into an object. Leading `?` or `#` are ignored, so you can
The returned object is created with [`Object.create(null)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create) and thus does not have a `prototype`.
-URI components are decoded with [`decode-uri-component`](https://github.com/SamVerschueren/decode-uri-component).
+#### decode
+
+Type: `boolean`<br>
+Default: `true`
+
+Decode the keys and values. URI components are decoded with [`decode-uri-component`](https://github.com/SamVerschueren/decode-uri-component).
#### arrayFormat
@@ -133,10 +144,44 @@ queryString.stringify({foo: [1,2,3]});
// => foo=1&foo=2&foo=3
```
+#### sort
+
+Type: `Function` `boolean`
+
+Supports both `Function` as a custom sorting function or `false` to disable sorting.
+
+```js
+const order = ['c', 'a', 'b'];
+queryString.stringify({ a: 1, b: 2, c: 3}, {
+ sort: (m, n) => order.indexOf(m) >= order.indexOf(n)
+});
+// => 'c=3&a=1&b=2'
+```
+
+```js
+queryString.stringify({ b: 1, c: 2, a: 3}, {sort: false});
+// => 'c=3&a=1&b=2'
+```
+
+If omitted, keys are sorted using `Array#sort`, which means, converting them to strings and comparing strings in Unicode code point order.
+
### .extract(*string*)
Extract a query string from a URL that can be passed into `.parse()`.
+### .parseUrl(*string*, *[options]*)
+
+Extract the URL and the query string as an object.
+
+The `options` are the same as for `.parse()`.
+
+Returns an object with a `url` and `query` property.
+
+```js
+queryString.parseUrl('https://foo.bar?foo=bar');
+//=> {url: 'https://foo.bar', query: {foo: 'bar'}}
+```
+
## Nesting