Added logging, changed some directory structure

This commit is contained in:
2018-01-13 21:33:40 -05:00
parent f079a5f067
commit 8e72ffb917
73656 changed files with 35284 additions and 53718 deletions

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.

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;

View File

@@ -0,0 +1,69 @@
{
"_args": [
[
"querystringify@0.0.4",
"C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\torrent-project"
]
],
"_from": "querystringify@0.0.4",
"_id": "querystringify@0.0.4",
"_inBundle": false,
"_integrity": "sha1-DPf4T5Rj/wrlHExLFC2VvjdyTZw=",
"_location": "/react-scripts/querystringify",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "querystringify@0.0.4",
"name": "querystringify",
"escapedName": "querystringify",
"rawSpec": "0.0.4",
"saveSpec": null,
"fetchSpec": "0.0.4"
},
"_requiredBy": [
"/react-scripts/original/url-parse"
],
"_resolved": "https://registry.npmjs.org/querystringify/-/querystringify-0.0.4.tgz",
"_spec": "0.0.4",
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\torrent-project",
"author": {
"name": "Arnout Kazemier"
},
"bugs": {
"url": "https://github.com/unshiftio/querystringify/issues"
},
"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"
},
"homepage": "https://github.com/unshiftio/querystringify",
"keywords": [
"query",
"string",
"query-string",
"querystring",
"qs",
"stringify",
"parse",
"decode",
"encode"
],
"license": "MIT",
"main": "index.js",
"name": "querystringify",
"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"
}