This commit is contained in:
chrosey
2017-09-13 07:52:34 +02:00
parent a1f16c37f4
commit 2340b0226b
24621 changed files with 2912161 additions and 149 deletions
+22
View File
@@ -0,0 +1,22 @@
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.
+61
View File
@@ -0,0 +1,61 @@
'use strict';
var has = Object.prototype.hasOwnProperty;
/**
* 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;
//
// Little nifty parsing hack, leverage the fact that RegExp.exec increments
// the lastIndex property so we can continue executing this loop until we've
// parsed all results.
//
for (;
part = parser.exec(query);
result[decodeURIComponent(part[1])] = decodeURIComponent(part[2])
);
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 = [];
//
// Optionally prefix with a '?' if needed
//
if ('string' !== typeof prefix) prefix = '?';
for (var key in obj) {
if (has.call(obj, key)) {
pairs.push(encodeURIComponent(key) +'='+ encodeURIComponent(obj[key]));
}
}
return pairs.length ? prefix + pairs.join('&') : '';
}
//
// Expose the module.
//
exports.stringify = querystringify;
exports.parse = querystring;
+110
View File
@@ -0,0 +1,110 @@
{
"_args": [
[
{
"raw": "querystringify@0.0.x",
"scope": null,
"escapedName": "querystringify",
"name": "querystringify",
"rawSpec": "0.0.x",
"spec": ">=0.0.0 <0.1.0",
"type": "range"
},
"c:\\xampp\\htdocs\\laravel\\node_modules\\original\\node_modules\\url-parse"
]
],
"_from": "querystringify@>=0.0.0 <0.1.0",
"_id": "querystringify@0.0.4",
"_inCache": true,
"_location": "/querystringify",
"_nodeVersion": "6.2.1",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
"tmp": "tmp/querystringify-0.0.4.tgz_1471247528293_0.9502724173944443"
},
"_npmUser": {
"name": "3rdeden",
"email": "npm@3rd-Eden.com"
},
"_npmVersion": "3.9.3",
"_phantomChildren": {},
"_requested": {
"raw": "querystringify@0.0.x",
"scope": null,
"escapedName": "querystringify",
"name": "querystringify",
"rawSpec": "0.0.x",
"spec": ">=0.0.0 <0.1.0",
"type": "range"
},
"_requiredBy": [
"/original/url-parse"
],
"_resolved": "https://registry.npmjs.org/querystringify/-/querystringify-0.0.4.tgz",
"_shasum": "0cf7f84f9463ff0ae51c4c4b142d95be37724d9c",
"_shrinkwrap": null,
"_spec": "querystringify@0.0.x",
"_where": "c:\\xampp\\htdocs\\laravel\\node_modules\\original\\node_modules\\url-parse",
"author": {
"name": "Arnout Kazemier"
},
"bugs": {
"url": "https://github.com/unshiftio/querystringify/issues"
},
"dependencies": {},
"description": "Querystringify - Small, simple but powerful query string parser.",
"devDependencies": {
"assume": "1.4.x",
"istanbul": "0.4.x",
"mocha": "2.4.x",
"pre-commit": "1.1.x"
},
"directories": {},
"dist": {
"shasum": "0cf7f84f9463ff0ae51c4c4b142d95be37724d9c",
"tarball": "https://registry.npmjs.org/querystringify/-/querystringify-0.0.4.tgz"
},
"gitHead": "b206ebd5928c1f39df68bb89bbd8875675dbcef0",
"homepage": "https://github.com/unshiftio/querystringify",
"keywords": [
"query",
"string",
"query-string",
"querystring",
"qs",
"stringify",
"parse",
"decode",
"encode"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "unshift",
"email": "npm@unshift.io"
},
{
"name": "v1",
"email": "info@3rd-Eden.com"
},
{
"name": "3rdeden",
"email": "npm@3rd-Eden.com"
}
],
"name": "querystringify",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/unshiftio/querystringify.git"
},
"scripts": {
"coverage": "istanbul cover _mocha -- test.js",
"test": "mocha test.js",
"test-travis": "istanbul cover _mocha --report lcovonly -- test.js",
"watch": "mocha --watch test.js"
},
"version": "0.0.4"
}