diff options
author | Minteck <contact@minteck.org> | 2023-02-23 19:34:56 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2023-02-23 19:34:56 +0100 |
commit | 3d1cd02f27518f1a04374c7c8320cd5d82ede6e9 (patch) | |
tree | 75be5fba4368472fb11c8015aee026b2b9a71888 /school/node_modules/querystringify | |
parent | 8cc1f13c17fa2fb5a4410542d39e650e02945634 (diff) | |
download | pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.tar.gz pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.tar.bz2 pluralconnect-3d1cd02f27518f1a04374c7c8320cd5d82ede6e9.zip |
Updated 40 files, added 37 files, deleted 1103 files and renamed 3905 files (automated)
Diffstat (limited to 'school/node_modules/querystringify')
-rw-r--r-- | school/node_modules/querystringify/LICENSE | 22 | ||||
-rw-r--r-- | school/node_modules/querystringify/README.md | 61 | ||||
-rw-r--r-- | school/node_modules/querystringify/index.js | 118 | ||||
-rw-r--r-- | school/node_modules/querystringify/package.json | 38 |
4 files changed, 0 insertions, 239 deletions
diff --git a/school/node_modules/querystringify/LICENSE b/school/node_modules/querystringify/LICENSE deleted file mode 100644 index 6dc9316..0000000 --- a/school/node_modules/querystringify/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Unshift.io, Arnout Kazemier, the Contributors. - -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/school/node_modules/querystringify/README.md b/school/node_modules/querystringify/README.md deleted file mode 100644 index 0339638..0000000 --- a/school/node_modules/querystringify/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# querystringify - -[![Version npm](http://img.shields.io/npm/v/querystringify.svg?style=flat-square)](https://www.npmjs.com/package/querystringify)[![Build Status](http://img.shields.io/travis/unshiftio/querystringify/master.svg?style=flat-square)](https://travis-ci.org/unshiftio/querystringify)[![Dependencies](https://img.shields.io/david/unshiftio/querystringify.svg?style=flat-square)](https://david-dm.org/unshiftio/querystringify)[![Coverage Status](http://img.shields.io/coveralls/unshiftio/querystringify/master.svg?style=flat-square)](https://coveralls.io/r/unshiftio/querystringify?branch=master) - -A somewhat JSON compatible interface for query string parsing. This query string -parser is dumb, don't expect to much from it as it only wants to parse simple -query strings. If you want to parse complex, multi level and deeply nested -query strings then you should ask your self. WTF am I doing? - -## Installation - -This module is released in npm as `querystringify`. It's also compatible with -`browserify` so it can be used on the server as well as on the client. To -install it simply run the following command from your CLI: - -``` -npm install --save querystringify -``` - -## Usage - -In the following examples we assume that you've already required the library as: - -```js -'use strict'; - -var qs = require('querystringify'); -``` - -### qs.parse() - -The parse method transforms a given query string in to an object. Parameters -without values are set to empty strings. It does not care if your query string -is prefixed with a `?`, a `#`, or not prefixed. It just extracts the parts -between the `=` and `&`: - -```js -qs.parse('?foo=bar'); // { foo: 'bar' } -qs.parse('#foo=bar'); // { foo: 'bar' } -qs.parse('foo=bar'); // { foo: 'bar' } -qs.parse('foo=bar&bar=foo'); // { foo: 'bar', bar: 'foo' } -qs.parse('foo&bar=foo'); // { foo: '', bar: 'foo' } -``` - -### qs.stringify() - -This transforms a given object in to a query string. By default we return the -query string without a `?` prefix. If you want to prefix it by default simply -supply `true` as second argument. If it should be prefixed by something else -simply supply a string with the prefix value as second argument: - -```js -qs.stringify({ foo: bar }); // foo=bar -qs.stringify({ foo: bar }, true); // ?foo=bar -qs.stringify({ foo: bar }, '#'); // #foo=bar -qs.stringify({ foo: '' }, '&'); // &foo= -``` - -## License - -MIT diff --git a/school/node_modules/querystringify/index.js b/school/node_modules/querystringify/index.js deleted file mode 100644 index 58c9808..0000000 --- a/school/node_modules/querystringify/index.js +++ /dev/null @@ -1,118 +0,0 @@ -'use strict'; - -var has = Object.prototype.hasOwnProperty - , undef; - -/** - * Decode a URI encoded string. - * - * @param {String} input The URI encoded string. - * @returns {String|Null} The decoded string. - * @api private - */ -function decode(input) { - try { - return decodeURIComponent(input.replace(/\+/g, ' ')); - } catch (e) { - return null; - } -} - -/** - * Attempts to encode a given input. - * - * @param {String} input The string that needs to be encoded. - * @returns {String|Null} The encoded string. - * @api private - */ -function encode(input) { - try { - return encodeURIComponent(input); - } catch (e) { - return null; - } -} - -/** - * Simple query string parser. - * - * @param {String} query The query string that needs to be parsed. - * @returns {Object} - * @api public - */ -function querystring(query) { - var parser = /([^=?#&]+)=?([^&]*)/g - , result = {} - , part; - - while (part = parser.exec(query)) { - var key = decode(part[1]) - , value = decode(part[2]); - - // - // Prevent overriding of existing properties. This ensures that build-in - // methods like `toString` or __proto__ are not overriden by malicious - // querystrings. - // - // In the case if failed decoding, we want to omit the key/value pairs - // from the result. - // - if (key === null || value === null || key in result) continue; - result[key] = value; - } - - return result; -} - -/** - * Transform a query string to an object. - * - * @param {Object} obj Object that should be transformed. - * @param {String} prefix Optional prefix. - * @returns {String} - * @api public - */ -function querystringify(obj, prefix) { - prefix = prefix || ''; - - var pairs = [] - , value - , key; - - // - // Optionally prefix with a '?' if needed - // - if ('string' !== typeof prefix) prefix = '?'; - - for (key in obj) { - if (has.call(obj, key)) { - value = obj[key]; - - // - // Edge cases where we actually want to encode the value to an empty - // string instead of the stringified value. - // - if (!value && (value === null || value === undef || isNaN(value))) { - value = ''; - } - - key = encode(key); - value = encode(value); - - // - // If we failed to encode the strings, we should bail out as we don't - // want to add invalid strings to the query. - // - if (key === null || value === null) continue; - pairs.push(key +'='+ value); - } - } - - return pairs.length ? prefix + pairs.join('&') : ''; -} - -// -// Expose the module. -// -exports.stringify = querystringify; -exports.parse = querystring; diff --git a/school/node_modules/querystringify/package.json b/school/node_modules/querystringify/package.json deleted file mode 100644 index 7b25904..0000000 --- a/school/node_modules/querystringify/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "querystringify", - "version": "2.2.0", - "description": "Querystringify - Small, simple but powerful query string parser.", - "main": "index.js", - "scripts": { - "test": "nyc --reporter=html --reporter=text mocha test.js", - "watch": "mocha --watch test.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/unshiftio/querystringify" - }, - "keywords": [ - "query", - "string", - "query-string", - "querystring", - "qs", - "stringify", - "parse", - "decode", - "encode" - ], - "author": "Arnout Kazemier", - "license": "MIT", - "bugs": { - "url": "https://github.com/unshiftio/querystringify/issues" - }, - "homepage": "https://github.com/unshiftio/querystringify", - "devDependencies": { - "assume": "^2.1.0", - "coveralls": "^3.1.0", - "mocha": "^8.1.1", - "nyc": "^15.1.0", - "pre-commit": "^1.2.2" - } -} |