diff options
Diffstat (limited to 'deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules')
50 files changed, 0 insertions, 3101 deletions
diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/co/History.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/co/History.md deleted file mode 100644 index 68fbb154d1..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/co/History.md +++ /dev/null @@ -1,172 +0,0 @@ -4.6.0 / 2015-07-09 -================== - - * support passing the rest of the arguments to co into the generator - - ```js - function *gen(...args) { } - co(gen, ...args); - ``` - -4.5.0 / 2015-03-17 -================== - - * support regular functions (that return promises) - -4.4.0 / 2015-02-14 -================== - - * refactor `isGeneratorFunction` - * expose generator function from `co.wrap()` - * drop support for node < 0.12 - -4.3.0 / 2015-02-05 -================== - - * check for generator functions in a ES5-transpiler-friendly way - -4.2.0 / 2015-01-20 -================== - - * support comparing generator functions with ES6 transpilers - -4.1.0 / 2014-12-26 -================== - - * fix memory leak #180 - -4.0.2 / 2014-12-18 -================== - - * always return a global promise implementation - -4.0.1 / 2014-11-30 -================== - - * friendlier ES6 module exports - -4.0.0 / 2014-11-15 -================== - - * co now returns a promise and uses promises underneath - * `co.wrap()` for wrapping generator functions - -3.1.0 / 2014-06-30 -================== - - * remove `setImmediate()` shim for node 0.8. semi-backwards breaking. - Users are expected to shim themselves. Also returns CommonJS browser support. - * added key order preservation for objects. thanks @greim - * replace `q` with `bluebird` in benchmarks and tests - -3.0.6 / 2014-05-03 -================== - - * add `setImmediate()` fallback to `process.nextTick` - * remove duplicate code in toThunk - * update thunkify - -3.0.5 / 2014-03-17 -================== - - * fix object/array test failure which tries to enumerate dates. Closes #98 - * fix final callback error propagation. Closes #92 - -3.0.4 / 2014-02-17 -================== - - * fix toThunk object check regression. Closes #89 - -3.0.3 / 2014-02-08 -================== - - * refactor: arrayToThunk @AutoSponge #88 - -3.0.2 / 2014-01-01 -================== - - * fixed: nil arguments replaced with error fn - -3.0.1 / 2013-12-19 -================== - - * fixed: callback passed as an argument to generators - -3.0.0 / 2013-12-19 -================== - - * fixed: callback passed as an argument to generators - * change: `co(function *(){})` now returns a reusable thunk - * change: `this` must now be passed through the returned thunk, ex. `co(function *(){}).call(this)` - * fix "generator already finished" errors - -2.3.0 / 2013-11-12 -================== - - * add `yield object` support - -2.2.0 / 2013-11-05 -================== - - * change: make the `isGenerator()` function more generic - -2.1.0 / 2013-10-21 -================== - - * add passing of arguments into the generator. closes #33. - -2.0.0 / 2013-10-14 -================== - - * remove callback in favour of thunk-only co(). Closes #30 [breaking change] - * remove `co.wrap()` [breaking change] - -1.5.2 / 2013-09-02 -================== - - * fix: preserve receiver with co.wrap() - -1.5.1 / 2013-08-11 -================== - - * remove setImmediate() usage - ~110% perf increase. Closes #14 - -0.5.0 / 2013-08-10 -================== - - * add receiver propagation support - * examples: update streams.js example to use `http.get()` and streams2 API - -1.4.1 / 2013-07-01 -================== - - * fix gen.next(val) for latest v8. Closes #8 - -1.4.0 / 2013-06-21 -================== - - * add promise support to joins - * add `yield generatorFunction` support - * add `yield generator` support - * add nested join support - -1.3.0 / 2013-06-10 -================== - - * add passing of arguments - -1.2.1 / 2013-06-08 -================== - - * fix join() of zero thunks - -1.2.0 / 2013-06-08 -================== - - * add array yielding support. great suggestion by @domenic - -1.1.0 / 2013-06-06 -================== - - * add promise support - * change nextTick to setImmediate diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/co/LICENSE b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/co/LICENSE deleted file mode 100644 index 92faba5db3..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/co/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca> - -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/request/node_modules/har-validator/node_modules/ajv/node_modules/co/Readme.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/co/Readme.md deleted file mode 100644 index c1d4882a13..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/co/Readme.md +++ /dev/null @@ -1,212 +0,0 @@ -# co - -[![Gitter][gitter-image]][gitter-url] -[![NPM version][npm-image]][npm-url] -[![Build status][travis-image]][travis-url] -[![Test coverage][coveralls-image]][coveralls-url] -[![Downloads][downloads-image]][downloads-url] - - Generator based control flow goodness for nodejs and the browser, - using promises, letting you write non-blocking code in a nice-ish way. - -## Co v4 - - `co@4.0.0` has been released, which now relies on promises. - It is a stepping stone towards [ES7 async/await](https://github.com/lukehoban/ecmascript-asyncawait). - The primary API change is how `co()` is invoked. - Before, `co` returned a "thunk", which you then called with a callback and optional arguments. - Now, `co()` returns a promise. - -```js -co(function* () { - var result = yield Promise.resolve(true); - return result; -}).then(function (value) { - console.log(value); -}, function (err) { - console.error(err.stack); -}); -``` - - If you want to convert a `co`-generator-function into a regular function that returns a promise, - you now use `co.wrap(fn*)`. - -```js -var fn = co.wrap(function* (val) { - return yield Promise.resolve(val); -}); - -fn(true).then(function (val) { - -}); -``` - -## Platform Compatibility - - `co@4+` requires a `Promise` implementation. - For versions of node `< 0.11` and for many older browsers, - you should/must include your own `Promise` polyfill. - - When using node 0.11.x or greater, you must use the `--harmony-generators` - flag or just `--harmony` to get access to generators. - - When using node 0.10.x and lower or browsers without generator support, - you must use [gnode](https://github.com/TooTallNate/gnode) and/or [regenerator](http://facebook.github.io/regenerator/). - - io.js is supported out of the box, you can use `co` without flags or polyfills. - -## Installation - -``` -$ npm install co -``` - -## Associated libraries - -Any library that returns promises work well with `co`. - -- [mz](https://github.com/normalize/mz) - wrap all of node's code libraries as promises. - -View the [wiki](https://github.com/visionmedia/co/wiki) for more libraries. - -## Examples - -```js -var co = require('co'); - -co(function *(){ - // yield any promise - var result = yield Promise.resolve(true); -}).catch(onerror); - -co(function *(){ - // resolve multiple promises in parallel - var a = Promise.resolve(1); - var b = Promise.resolve(2); - var c = Promise.resolve(3); - var res = yield [a, b, c]; - console.log(res); - // => [1, 2, 3] -}).catch(onerror); - -// errors can be try/catched -co(function *(){ - try { - yield Promise.reject(new Error('boom')); - } catch (err) { - console.error(err.message); // "boom" - } -}).catch(onerror); - -function onerror(err) { - // log any uncaught errors - // co will not throw any errors you do not handle!!! - // HANDLE ALL YOUR ERRORS!!! - console.error(err.stack); -} -``` - -## Yieldables - - The `yieldable` objects currently supported are: - - - promises - - thunks (functions) - - array (parallel execution) - - objects (parallel execution) - - generators (delegation) - - generator functions (delegation) - -Nested `yieldable` objects are supported, meaning you can nest -promises within objects within arrays, and so on! - -### Promises - -[Read more on promises!](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) - -### Thunks - -Thunks are functions that only have a single argument, a callback. -Thunk support only remains for backwards compatibility and may -be removed in future versions of `co`. - -### Arrays - -`yield`ing an array will resolve all the `yieldables` in parallel. - -```js -co(function* () { - var res = yield [ - Promise.resolve(1), - Promise.resolve(2), - Promise.resolve(3), - ]; - console.log(res); // => [1, 2, 3] -}).catch(onerror); -``` - -### Objects - -Just like arrays, objects resolve all `yieldable`s in parallel. - -```js -co(function* () { - var res = yield { - 1: Promise.resolve(1), - 2: Promise.resolve(2), - }; - console.log(res); // => { 1: 1, 2: 2 } -}).catch(onerror); -``` - -### Generators and Generator Functions - -Any generator or generator function you can pass into `co` -can be yielded as well. This should generally be avoided -as we should be moving towards spec-compliant `Promise`s instead. - -## API - -### co(fn*).then( val => ) - -Returns a promise that resolves a generator, generator function, -or any function that returns a generator. - -```js -co(function* () { - return yield Promise.resolve(true); -}).then(function (val) { - console.log(val); -}, function (err) { - console.error(err.stack); -}); -``` - -### var fn = co.wrap(fn*) - -Convert a generator into a regular function that returns a `Promise`. - -```js -var fn = co.wrap(function* (val) { - return yield Promise.resolve(val); -}); - -fn(true).then(function (val) { - -}); -``` - -## License - - MIT - -[npm-image]: https://img.shields.io/npm/v/co.svg?style=flat-square -[npm-url]: https://npmjs.org/package/co -[travis-image]: https://img.shields.io/travis/tj/co.svg?style=flat-square -[travis-url]: https://travis-ci.org/tj/co -[coveralls-image]: https://img.shields.io/coveralls/tj/co.svg?style=flat-square -[coveralls-url]: https://coveralls.io/r/tj/co -[downloads-image]: http://img.shields.io/npm/dm/co.svg?style=flat-square -[downloads-url]: https://npmjs.org/package/co -[gitter-image]: https://badges.gitter.im/Join%20Chat.svg -[gitter-url]: https://gitter.im/tj/co?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/co/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/co/index.js deleted file mode 100644 index 87ba8ba8b4..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/co/index.js +++ /dev/null @@ -1,237 +0,0 @@ - -/** - * slice() reference. - */ - -var slice = Array.prototype.slice; - -/** - * Expose `co`. - */ - -module.exports = co['default'] = co.co = co; - -/** - * Wrap the given generator `fn` into a - * function that returns a promise. - * This is a separate function so that - * every `co()` call doesn't create a new, - * unnecessary closure. - * - * @param {GeneratorFunction} fn - * @return {Function} - * @api public - */ - -co.wrap = function (fn) { - createPromise.__generatorFunction__ = fn; - return createPromise; - function createPromise() { - return co.call(this, fn.apply(this, arguments)); - } -}; - -/** - * Execute the generator function or a generator - * and return a promise. - * - * @param {Function} fn - * @return {Promise} - * @api public - */ - -function co(gen) { - var ctx = this; - var args = slice.call(arguments, 1) - - // we wrap everything in a promise to avoid promise chaining, - // which leads to memory leak errors. - // see https://github.com/tj/co/issues/180 - return new Promise(function(resolve, reject) { - if (typeof gen === 'function') gen = gen.apply(ctx, args); - if (!gen || typeof gen.next !== 'function') return resolve(gen); - - onFulfilled(); - - /** - * @param {Mixed} res - * @return {Promise} - * @api private - */ - - function onFulfilled(res) { - var ret; - try { - ret = gen.next(res); - } catch (e) { - return reject(e); - } - next(ret); - } - - /** - * @param {Error} err - * @return {Promise} - * @api private - */ - - function onRejected(err) { - var ret; - try { - ret = gen.throw(err); - } catch (e) { - return reject(e); - } - next(ret); - } - - /** - * Get the next value in the generator, - * return a promise. - * - * @param {Object} ret - * @return {Promise} - * @api private - */ - - function next(ret) { - if (ret.done) return resolve(ret.value); - var value = toPromise.call(ctx, ret.value); - if (value && isPromise(value)) return value.then(onFulfilled, onRejected); - return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, ' - + 'but the following object was passed: "' + String(ret.value) + '"')); - } - }); -} - -/** - * Convert a `yield`ed value into a promise. - * - * @param {Mixed} obj - * @return {Promise} - * @api private - */ - -function toPromise(obj) { - if (!obj) return obj; - if (isPromise(obj)) return obj; - if (isGeneratorFunction(obj) || isGenerator(obj)) return co.call(this, obj); - if ('function' == typeof obj) return thunkToPromise.call(this, obj); - if (Array.isArray(obj)) return arrayToPromise.call(this, obj); - if (isObject(obj)) return objectToPromise.call(this, obj); - return obj; -} - -/** - * Convert a thunk to a promise. - * - * @param {Function} - * @return {Promise} - * @api private - */ - -function thunkToPromise(fn) { - var ctx = this; - return new Promise(function (resolve, reject) { - fn.call(ctx, function (err, res) { - if (err) return reject(err); - if (arguments.length > 2) res = slice.call(arguments, 1); - resolve(res); - }); - }); -} - -/** - * Convert an array of "yieldables" to a promise. - * Uses `Promise.all()` internally. - * - * @param {Array} obj - * @return {Promise} - * @api private - */ - -function arrayToPromise(obj) { - return Promise.all(obj.map(toPromise, this)); -} - -/** - * Convert an object of "yieldables" to a promise. - * Uses `Promise.all()` internally. - * - * @param {Object} obj - * @return {Promise} - * @api private - */ - -function objectToPromise(obj){ - var results = new obj.constructor(); - var keys = Object.keys(obj); - var promises = []; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var promise = toPromise.call(this, obj[key]); - if (promise && isPromise(promise)) defer(promise, key); - else results[key] = obj[key]; - } - return Promise.all(promises).then(function () { - return results; - }); - - function defer(promise, key) { - // predefine the key in the result - results[key] = undefined; - promises.push(promise.then(function (res) { - results[key] = res; - })); - } -} - -/** - * Check if `obj` is a promise. - * - * @param {Object} obj - * @return {Boolean} - * @api private - */ - -function isPromise(obj) { - return 'function' == typeof obj.then; -} - -/** - * Check if `obj` is a generator. - * - * @param {Mixed} obj - * @return {Boolean} - * @api private - */ - -function isGenerator(obj) { - return 'function' == typeof obj.next && 'function' == typeof obj.throw; -} - -/** - * Check if `obj` is a generator function. - * - * @param {Mixed} obj - * @return {Boolean} - * @api private - */ -function isGeneratorFunction(obj) { - var constructor = obj.constructor; - if (!constructor) return false; - if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true; - return isGenerator(constructor.prototype); -} - -/** - * Check for plain object. - * - * @param {Mixed} val - * @return {Boolean} - * @api private - */ - -function isObject(val) { - return Object == val.constructor; -} diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/co/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/co/package.json deleted file mode 100644 index 3847c01d4d..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/co/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "co@^4.6.0", - "_id": "co@4.6.0", - "_integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "_location": "/request/har-validator/ajv/co", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "co@^4.6.0", - "name": "co", - "escapedName": "co", - "rawSpec": "^4.6.0", - "saveSpec": null, - "fetchSpec": "^4.6.0" - }, - "_requiredBy": [ - "/request/har-validator/ajv" - ], - "_resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "_shasum": "6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184", - "_shrinkwrap": null, - "_spec": "co@^4.6.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/request/node_modules/har-validator/node_modules/ajv", - "bin": null, - "bugs": { - "url": "https://github.com/tj/co/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "generator async control flow goodness", - "devDependencies": { - "browserify": "^10.0.0", - "istanbul-harmony": "0", - "mocha": "^2.0.0", - "mz": "^1.0.2" - }, - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/tj/co#readme", - "keywords": [ - "async", - "flow", - "generator", - "coro", - "coroutine" - ], - "license": "MIT", - "name": "co", - "optionalDependencies": {}, - "peerDependencies": {}, - "repository": { - "type": "git", - "url": "git+https://github.com/tj/co.git" - }, - "scripts": { - "browserify": "browserify index.js -o ./co-browser.js -s co", - "prepublish": "npm run browserify", - "test": "mocha --harmony", - "test-cov": "node --harmony node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --reporter dot", - "test-travis": "node --harmony node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- --reporter dot" - }, - "version": "4.6.0" -} diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/.eslintrc.yml b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/.eslintrc.yml deleted file mode 100644 index 14ab1fb978..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/.eslintrc.yml +++ /dev/null @@ -1,25 +0,0 @@ -env: - node: true -extends: 'eslint:recommended' -rules: - indent: [ 2, 2, { SwitchCase: 1 } ] - no-trailing-spaces: 2 - quotes: [ 2, single, avoid-escape ] - linebreak-style: [ 2, unix ] - semi: [ 2, always ] - valid-jsdoc: [ 2, { requireReturn: false } ] - no-invalid-this: 2 - no-unused-vars: [ 2, { args: none } ] - no-console: [ 2, { allow: [ warn, error ] } ] - block-scoped-var: 2 - curly: [ 2, multi-or-nest, consistent ] - dot-location: [ 2, property ] - dot-notation: 2 - no-else-return: 2 - no-eq-null: 2 - no-fallthrough: 2 - no-return-assign: 2 - strict: [ 2, global ] - no-use-before-define: [ 2, nofunc ] - callback-return: 2 - no-path-concat: 2 diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/.npmignore b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/.npmignore deleted file mode 100644 index d093557930..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/.npmignore +++ /dev/null @@ -1,60 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Typescript v1 declaration files -typings/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env - -.DS_Store diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/.travis.yml b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/.travis.yml deleted file mode 100644 index 7ddce74b84..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "4" - - "6" - - "7" - - "8" -after_script: - - coveralls < coverage/lcov.info diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/LICENSE b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/LICENSE deleted file mode 100644 index 7f1543566f..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Evgeny Poberezkin - -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/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/README.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/README.md deleted file mode 100644 index ee83edd454..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# fast-deep-equal -The fastest deep equal - -[![Build Status](https://travis-ci.org/epoberezkin/fast-deep-equal.svg?branch=master)](https://travis-ci.org/epoberezkin/fast-deep-equal) -[![npm version](https://badge.fury.io/js/fast-deep-equal.svg)](http://badge.fury.io/js/fast-deep-equal) -[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/fast-deep-equal/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/fast-deep-equal?branch=master) - - -## Install - -```bash -npm install fast-deep-equal -``` - - -## Features - -- ES5 compatible -- works in node.js (0.10+) and browsers (IE9+) -- checks equality of Date and RegExp objects by value. - - -## Usage - -```javascript -var equal = require('fast-deep-equal'); -console.log(equal({foo: 'bar'}, {foo: 'bar'})); // true -``` - - -## Performance benchmark - -``` -fast-deep-equal x 82,915 ops/sec ±0.63% (89 runs sampled) -nano-equal x 50,506 ops/sec ±2.23% (86 runs sampled) -shallow-equal-fuzzy x 14,873 ops/sec ±3.19% (83 runs sampled) -underscore.isEqual x 16,055 ops/sec ±2.29% (85 runs sampled) -lodash.isEqual x 10,740 ops/sec ±1.04% (89 runs sampled) -deep-equal x 12,276 ops/sec ±2.44% (84 runs sampled) -deep-eql x 10,565 ops/sec ±0.89% (90 runs sampled) -assert.deepStrictEqual x 965 ops/sec ±2.99% (81 runs sampled) -The fastest is fast-deep-equal -``` - -To run benchmark (requires node.js 6+): - -```bash -npm install -node benchmark -``` - - -## License - -[MIT](https://github.com/epoberezkin/fast-deep-equal/blob/master/LICENSE) diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/benchmark/.eslintrc.yml b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/benchmark/.eslintrc.yml deleted file mode 100644 index 32a081d849..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/benchmark/.eslintrc.yml +++ /dev/null @@ -1,5 +0,0 @@ -parserOptions: - ecmaVersion: 2016 -rules: - no-invalid-this: 0 - no-console: 0 diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/benchmark/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/benchmark/index.js deleted file mode 100644 index ed01a39fb8..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/benchmark/index.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -const assertDeepStrictEqual = require('assert').deepStrictEqual; -const tests = require('../spec/tests'); -const Benchmark = require('benchmark'); -const suite = new Benchmark.Suite; - - -const equalPackages = { - 'fast-deep-equal': require('../index'), - 'nano-equal': true, - 'shallow-equal-fuzzy': true, - 'underscore.isEqual': require('underscore').isEqual, - 'lodash.isEqual': require('lodash').isEqual, - 'deep-equal': true, - 'deep-eql': true, - 'assert.deepStrictEqual': (a, b) => { - try { assertDeepStrictEqual(a, b); return true; } - catch(e) { return false; } - } -}; - - -for (const equalName in equalPackages) { - let equalFunc = equalPackages[equalName]; - if (equalFunc === true) equalFunc = require(equalName); - - for (const testSuite of tests) { - for (const test of testSuite.tests) { - try { - if (equalFunc(test.value1, test.value2) !== test.equal) - console.error('different result', equalName, testSuite.description, test.description); - } catch(e) { - console.error(equalName, testSuite.description, test.description, e); - } - } - } - - suite.add(equalName, function() { - for (const testSuite of tests) { - for (const test of testSuite.tests) { - if (test.description != 'pseudo array and equivalent array are not equal') - equalFunc(test.value1, test.value2); - } - } - }); -} - -console.log(); - -suite - .on('cycle', (event) => console.log(String(event.target))) - .on('complete', function () { - console.log('The fastest is ' + this.filter('fastest').map('name')); - }) - .run({async: true}); diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/index.js deleted file mode 100644 index a29572d71d..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/index.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -module.exports = function equal(a, b) { - if (a === b) return true; - - var arrA = Array.isArray(a) - , arrB = Array.isArray(b) - , i; - - if (arrA && arrB) { - if (a.length != b.length) return false; - for (i = 0; i < a.length; i++) - if (!equal(a[i], b[i])) return false; - return true; - } - - if (arrA != arrB) return false; - - if (a && b && typeof a === 'object' && typeof b === 'object') { - var keys = Object.keys(a); - if (keys.length !== Object.keys(b).length) return false; - - var dateA = a instanceof Date - , dateB = b instanceof Date; - if (dateA && dateB) return a.getTime() == b.getTime(); - if (dateA != dateB) return false; - - var regexpA = a instanceof RegExp - , regexpB = b instanceof RegExp; - if (regexpA && regexpB) return a.toString() == b.toString(); - if (regexpA != regexpB) return false; - - for (i = 0; i < keys.length; i++) - if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; - - for (i = 0; i < keys.length; i++) - if(!equal(a[keys[i]], b[keys[i]])) return false; - - return true; - } - - return false; -}; diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/package.json deleted file mode 100644 index ef645987ef..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_from": "fast-deep-equal@^1.0.0", - "_id": "fast-deep-equal@1.0.0", - "_inBundle": false, - "_integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=", - "_location": "/request/har-validator/ajv/fast-deep-equal", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "fast-deep-equal@^1.0.0", - "name": "fast-deep-equal", - "escapedName": "fast-deep-equal", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/request/har-validator/ajv" - ], - "_resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", - "_shasum": "96256a3bc975595eb36d82e9929d060d893439ff", - "_spec": "fast-deep-equal@^1.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/har-validator/node_modules/ajv", - "author": { - "name": "Evgeny Poberezkin" - }, - "bugs": { - "url": "https://github.com/epoberezkin/fast-deep-equal/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Fast deep equal", - "devDependencies": { - "benchmark": "^2.1.4", - "coveralls": "^2.13.1", - "deep-eql": "^2.0.2", - "deep-equal": "^1.0.1", - "eslint": "^4.0.0", - "lodash": "^4.17.4", - "mocha": "^3.4.2", - "nano-equal": "^1.0.1", - "nyc": "^11.0.2", - "pre-commit": "^1.2.2", - "shallow-equal-fuzzy": "0.0.2", - "underscore": "^1.8.3" - }, - "homepage": "https://github.com/epoberezkin/fast-deep-equal#readme", - "keywords": [ - "fast", - "equal", - "deep-equal" - ], - "license": "MIT", - "main": "index.js", - "name": "fast-deep-equal", - "nyc": { - "exclude": [ - "**/spec/**", - "node_modules" - ], - "reporter": [ - "lcov", - "text-summary" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/epoberezkin/fast-deep-equal.git" - }, - "scripts": { - "eslint": "eslint *.js benchmark spec", - "test": "npm run eslint && npm run test-cov", - "test-cov": "nyc npm run test-spec", - "test-spec": "mocha spec/*.spec.js -R spec" - }, - "version": "1.0.0" -} diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/spec/.eslintrc.yml b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/spec/.eslintrc.yml deleted file mode 100644 index 5869f6243d..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/spec/.eslintrc.yml +++ /dev/null @@ -1,5 +0,0 @@ -rules: - no-console: 0 -globals: - describe: false - it: false diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/spec/index.spec.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/spec/index.spec.js deleted file mode 100644 index 1fab259ee2..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/spec/index.spec.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var equal = require('../index'); -var tests = require('./tests'); -var assert = require('assert'); - - -describe('equal', function() { - tests.forEach(function (suite) { - describe(suite.description, function() { - suite.tests.forEach(function (test) { - it(test.description, function() { - assert.strictEqual(equal(test.value1, test.value2), test.equal); - }); - }); - }); - }); -}); diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/spec/tests.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/spec/tests.js deleted file mode 100644 index f8d1ddf915..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/spec/tests.js +++ /dev/null @@ -1,320 +0,0 @@ -'use strict'; - -module.exports = [ - { - description: 'scalars', - tests: [ - { - description: 'equal numbers', - value1: 1, - value2: 1, - equal: true - }, - { - description: 'not equal numbers', - value1: 1, - value2: 2, - equal: false - }, - { - description: 'number and array are not equal', - value1: 1, - value2: [], - equal: false - }, - { - description: '0 and null are not equal', - value1: 0, - value2: null, - equal: false - }, - { - description: 'equal strings', - value1: 'a', - value2: 'a', - equal: true - }, - { - description: 'not equal strings', - value1: 'a', - value2: 'b', - equal: false - }, - { - description: 'empty string and null are not equal', - value1: '', - value2: null, - equal: false - }, - { - description: 'null is equal to null', - value1: null, - value2: null, - equal: true - }, - { - description: 'equal booleans (true)', - value1: true, - value2: true, - equal: true - }, - { - description: 'equal booleans (false)', - value1: false, - value2: false, - equal: true - }, - { - description: 'not equal booleans', - value1: true, - value2: false, - equal: false - }, - { - description: '1 and true are not equal', - value1: 1, - value2: true, - equal: false - }, - { - description: '0 and false are not equal', - value1: 0, - value2: false, - equal: false - } - ] - }, - - { - description: 'objects', - tests: [ - { - description: 'empty objects are equal', - value1: {}, - value2: {}, - equal: true - }, - { - description: 'equal objects (same properties "order")', - value1: {a: 1, b: '2'}, - value2: {a: 1, b: '2'}, - equal: true - }, - { - description: 'equal objects (different properties "order")', - value1: {a: 1, b: '2'}, - value2: {b: '2', a: 1}, - equal: true - }, - { - description: 'not equal objects (extra property)', - value1: {a: 1, b: '2'}, - value2: {a: 1, b: '2', c: []}, - equal: false - }, - { - description: 'not equal objects (different properties)', - value1: {a: 1, b: '2', c: 3}, - value2: {a: 1, b: '2', d: 3}, - equal: false - }, - { - description: 'not equal objects (different properties)', - value1: {a: 1, b: '2', c: 3}, - value2: {a: 1, b: '2', d: 3}, - equal: false - }, - { - description: 'equal objects (same sub-properties)', - value1: { a: [ { b: 'c' } ] }, - value2: { a: [ { b: 'c' } ] }, - equal: true - }, - { - description: 'not equal objects (different sub-property value)', - value1: { a: [ { b: 'c' } ] }, - value2: { a: [ { b: 'd' } ] }, - equal: false - }, - { - description: 'not equal objects (different sub-property)', - value1: { a: [ { b: 'c' } ] }, - value2: { a: [ { c: 'c' } ] }, - equal: false - }, - { - description: 'empty array and empty object are not equal', - value1: {}, - value2: [], - equal: false - }, - { - description: 'object with extra undefined properties are not equal #1', - value1: {}, - value2: {foo: undefined}, - equal: false - }, - { - description: 'object with extra undefined properties are not equal #2', - value1: {foo: undefined}, - value2: {}, - equal: false - }, - { - description: 'object with extra undefined properties are not equal #3', - value1: {foo: undefined}, - value2: {bar: undefined}, - equal: false - } - ] - }, - - { - description: 'arrays', - tests: [ - { - description: 'two empty arrays are equal', - value1: [], - value2: [], - equal: true - }, - { - description: 'equal arrays', - value1: [1, 2, 3], - value2: [1, 2, 3], - equal: true - }, - { - description: 'not equal arrays (different item)', - value1: [1, 2, 3], - value2: [1, 2, 4], - equal: false - }, - { - description: 'not equal arrays (different length)', - value1: [1, 2, 3], - value2: [1, 2], - equal: false - }, - { - description: 'equal arrays of objects', - value1: [{a: 'a'}, {b: 'b'}], - value2: [{a: 'a'}, {b: 'b'}], - equal: true - }, - { - description: 'not equal arrays of objects', - value1: [{a: 'a'}, {b: 'b'}], - value2: [{a: 'a'}, {b: 'c'}], - equal: false - }, - { - description: 'pseudo array and equivalent array are not equal', - value1: {'0': 0, '1': 1, length: 2}, - value2: [0, 1], - equal: false - } - ] - }, - { - description: 'Date objects', - tests: [ - { - description: 'equal date objects', - value1: new Date('2017-06-16T21:36:48.362Z'), - value2: new Date('2017-06-16T21:36:48.362Z'), - equal: true - }, - { - description: 'not equal date objects', - value1: new Date('2017-06-16T21:36:48.362Z'), - value2: new Date('2017-01-01T00:00:00.000Z'), - equal: false - }, - { - description: 'date and string are not equal', - value1: new Date('2017-06-16T21:36:48.362Z'), - value2: '2017-06-16T21:36:48.362Z', - equal: false - }, - { - description: 'date and object are not equal', - value1: new Date('2017-06-16T21:36:48.362Z'), - value2: {}, - equal: false - } - ] - }, - { - description: 'RegExp objects', - tests: [ - { - description: 'equal RegExp objects', - value1: /foo/, - value2: /foo/, - equal: true - }, - { - description: 'not equal RegExp objects (different pattern)', - value1: /foo/, - value2: /bar/, - equal: false - }, - { - description: 'not equal RegExp objects (different flags)', - value1: /foo/, - value2: /foo/i, - equal: false - }, - { - description: 'RegExp and string are not equal', - value1: /foo/, - value2: 'foo', - equal: false - }, - { - description: 'RegExp and object are not equal', - value1: /foo/, - value2: {}, - equal: false - } - ] - }, - { - description: 'sample objects', - tests: [ - { - description: 'big object', - value1: { - prop1: 'value1', - prop2: 'value2', - prop3: 'value3', - prop4: { - subProp1: 'sub value1', - subProp2: { - subSubProp1: 'sub sub value1', - subSubProp2: [1, 2, {prop2: 1, prop: 2}, 4, 5] - } - }, - prop5: 1000, - prop6: new Date(2016, 2, 10) - }, - value2: { - prop5: 1000, - prop3: 'value3', - prop1: 'value1', - prop2: 'value2', - prop6: new Date('2016/03/10'), - prop4: { - subProp2: { - subSubProp1: 'sub sub value1', - subSubProp2: [1, 2, {prop2: 1, prop: 2}, 4, 5] - }, - subProp1: 'sub value1' - } - }, - equal: true - } - ] - } -]; diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/.eslintrc.yml b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/.eslintrc.yml deleted file mode 100644 index ab1762da9c..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/.eslintrc.yml +++ /dev/null @@ -1,27 +0,0 @@ -extends: eslint:recommended -env: - node: true - browser: true -rules: - block-scoped-var: 2 - complexity: [2, 13] - curly: [2, multi-or-nest, consistent] - dot-location: [2, property] - dot-notation: 2 - indent: [2, 2, SwitchCase: 1] - linebreak-style: [2, unix] - new-cap: 2 - no-console: [2, allow: [warn, error]] - no-else-return: 2 - no-eq-null: 2 - no-fallthrough: 2 - no-invalid-this: 2 - no-return-assign: 2 - no-shadow: 1 - no-trailing-spaces: 2 - no-use-before-define: [2, nofunc] - quotes: [2, single, avoid-escape] - semi: [2, always] - strict: [2, global] - valid-jsdoc: [2, requireReturn: false] - no-control-regex: 0 diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/.npmignore b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/.npmignore deleted file mode 100644 index d093557930..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/.npmignore +++ /dev/null @@ -1,60 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Typescript v1 declaration files -typings/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env - -.DS_Store diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/.travis.yml b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/.travis.yml deleted file mode 100644 index 7ddce74b84..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - "4" - - "6" - - "7" - - "8" -after_script: - - coveralls < coverage/lcov.info diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/LICENSE b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/LICENSE deleted file mode 100644 index 7f1543566f..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Evgeny Poberezkin - -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/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/README.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/README.md deleted file mode 100644 index d4286a23b3..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# json-schema-traverse -Traverse JSON Schema passing each schema object to callback - -[![Build Status](https://travis-ci.org/epoberezkin/json-schema-traverse.svg?branch=master)](https://travis-ci.org/epoberezkin/json-schema-traverse) -[![npm version](https://badge.fury.io/js/json-schema-traverse.svg)](https://www.npmjs.com/package/json-schema-traverse) -[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/json-schema-traverse/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/json-schema-traverse?branch=master) - - -## Install - -``` -npm install json-schema-traverse -``` - - -## Usage - -```javascript -const traverse = require('json-schema-traverse'); -const schema = { - properties: { - foo: {type: 'string'}, - bar: {type: 'integer'} - } -}; - -traverse(schema, cb); -// cb is called 3 times with: -// 1. root schema -// 2. {type: 'string'} -// 3. {type: 'integer'} -``` - -Callback function is called for each schema object (not including draft-06 boolean schemas), including the root schema. Schema references ($ref) are not resolved, they are passed as is. - -Callback is passed these parameters: - -- _schema_: the current schema object -- _JSON pointer_: from the root schema to the current schema object -- _root schema_: the schema passed to `traverse` object -- _parent JSON pointer_: from the root schema to the parent schema object (see below) -- _parent keyword_: the keyword inside which this schema appears (e.g. `properties`, `anyOf`, etc.) -- _parent schema_: not necessarily parent object/array; in the example above the parent schema for `{type: 'string'}` is the root schema -- _index/property_: index or property name in the array/object containing multiple schemas; in the example above for `{type: 'string'}` the property name is `'foo'` - - -## Traverse objects in all unknown keywords - -```javascript -const traverse = require('json-schema-traverse'); -const schema = { - mySchema: { - minimum: 1, - maximum: 2 - } -}; - -traverse(schema, {allKeys: true}, cb); -// cb is called 2 times with: -// 1. root schema -// 2. mySchema -``` - -Without option `allKeys: true` callback will be called only with root schema. - - -## License - -[MIT](https://github.com/epoberezkin/json-schema-traverse/blob/master/LICENSE) diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/index.js deleted file mode 100644 index 79eeb6a05e..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/index.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict'; - -var traverse = module.exports = function (schema, opts, cb) { - if (typeof opts == 'function') { - cb = opts; - opts = {}; - } - _traverse(opts, cb, schema, '', schema); -}; - - -traverse.keywords = { - additionalItems: true, - items: true, - contains: true, - additionalProperties: true, - propertyNames: true, - not: true -}; - -traverse.arrayKeywords = { - items: true, - allOf: true, - anyOf: true, - oneOf: true -}; - -traverse.propsKeywords = { - definitions: true, - properties: true, - patternProperties: true, - dependencies: true -}; - -traverse.skipKeywords = { - enum: true, - const: true, - required: true, - maximum: true, - minimum: true, - exclusiveMaximum: true, - exclusiveMinimum: true, - multipleOf: true, - maxLength: true, - minLength: true, - pattern: true, - format: true, - maxItems: true, - minItems: true, - uniqueItems: true, - maxProperties: true, - minProperties: true -}; - - -function _traverse(opts, cb, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { - if (schema && typeof schema == 'object' && !Array.isArray(schema)) { - cb(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); - for (var key in schema) { - var sch = schema[key]; - if (Array.isArray(sch)) { - if (key in traverse.arrayKeywords) { - for (var i=0; i<sch.length; i++) - _traverse(opts, cb, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i); - } - } else if (key in traverse.propsKeywords) { - if (sch && typeof sch == 'object') { - for (var prop in sch) - _traverse(opts, cb, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop); - } - } else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) { - _traverse(opts, cb, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema); - } - } - } -} - - -function escapeJsonPtr(str) { - return str.replace(/~/g, '~0').replace(/\//g, '~1'); -} diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/package.json deleted file mode 100644 index 83254dfda7..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "json-schema-traverse@^0.3.0", - "_id": "json-schema-traverse@0.3.1", - "_inBundle": false, - "_integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "_location": "/request/har-validator/ajv/json-schema-traverse", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "json-schema-traverse@^0.3.0", - "name": "json-schema-traverse", - "escapedName": "json-schema-traverse", - "rawSpec": "^0.3.0", - "saveSpec": null, - "fetchSpec": "^0.3.0" - }, - "_requiredBy": [ - "/request/har-validator/ajv" - ], - "_resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "_shasum": "349a6d44c53a51de89b40805c5d5e59b417d3340", - "_spec": "json-schema-traverse@^0.3.0", - "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/har-validator/node_modules/ajv", - "author": { - "name": "Evgeny Poberezkin" - }, - "bugs": { - "url": "https://github.com/epoberezkin/json-schema-traverse/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Traverse JSON Schema passing each schema object to callback", - "devDependencies": { - "coveralls": "^2.13.1", - "eslint": "^3.19.0", - "mocha": "^3.4.2", - "nyc": "^11.0.2", - "pre-commit": "^1.2.2" - }, - "homepage": "https://github.com/epoberezkin/json-schema-traverse#readme", - "keywords": [ - "JSON-Schema", - "traverse", - "iterate" - ], - "license": "MIT", - "main": "index.js", - "name": "json-schema-traverse", - "nyc": { - "exclude": [ - "**/spec/**", - "node_modules" - ], - "reporter": [ - "lcov", - "text-summary" - ] - }, - "repository": { - "type": "git", - "url": "git+https://github.com/epoberezkin/json-schema-traverse.git" - }, - "scripts": { - "eslint": "eslint index.js spec", - "test": "npm run eslint && nyc npm run test-spec", - "test-spec": "mocha spec -R spec" - }, - "version": "0.3.1" -} diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/.eslintrc.yml b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/.eslintrc.yml deleted file mode 100644 index 3344da7eb3..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/.eslintrc.yml +++ /dev/null @@ -1,6 +0,0 @@ -parserOptions: - ecmaVersion: 6 -globals: - beforeEach: false - describe: false - it: false diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/fixtures/schema.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/fixtures/schema.js deleted file mode 100644 index c51430cdc3..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/fixtures/schema.js +++ /dev/null @@ -1,125 +0,0 @@ -'use strict'; - -var schema = { - additionalItems: subschema('additionalItems'), - items: subschema('items'), - contains: subschema('contains'), - additionalProperties: subschema('additionalProperties'), - propertyNames: subschema('propertyNames'), - not: subschema('not'), - allOf: [ - subschema('allOf_0'), - subschema('allOf_1'), - { - items: [ - subschema('items_0'), - subschema('items_1'), - ] - } - ], - anyOf: [ - subschema('anyOf_0'), - subschema('anyOf_1'), - ], - oneOf: [ - subschema('oneOf_0'), - subschema('oneOf_1'), - ], - definitions: { - foo: subschema('definitions_foo'), - bar: subschema('definitions_bar'), - }, - properties: { - foo: subschema('properties_foo'), - bar: subschema('properties_bar'), - }, - patternProperties: { - foo: subschema('patternProperties_foo'), - bar: subschema('patternProperties_bar'), - }, - dependencies: { - foo: subschema('dependencies_foo'), - bar: subschema('dependencies_bar'), - }, - required: ['foo', 'bar'] -}; - - -function subschema(keyword) { - var sch = { - properties: {}, - additionalProperties: false, - additionalItems: false, - anyOf: [ - {format: 'email'}, - {format: 'hostname'} - ] - }; - sch.properties['foo_' + keyword] = {title: 'foo'}; - sch.properties['bar_' + keyword] = {title: 'bar'}; - return sch; -} - - -module.exports = { - schema: schema, - - // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex - expectedCalls: [[schema, '', schema, undefined, undefined, undefined, undefined]] - .concat(expectedCalls('additionalItems')) - .concat(expectedCalls('items')) - .concat(expectedCalls('contains')) - .concat(expectedCalls('additionalProperties')) - .concat(expectedCalls('propertyNames')) - .concat(expectedCalls('not')) - .concat(expectedCallsChild('allOf', 0)) - .concat(expectedCallsChild('allOf', 1)) - .concat([ - [schema.allOf[2], '/allOf/2', schema, '', 'allOf', schema, 2], - [schema.allOf[2].items[0], '/allOf/2/items/0', schema, '/allOf/2', 'items', schema.allOf[2], 0], - [schema.allOf[2].items[0].properties.foo_items_0, '/allOf/2/items/0/properties/foo_items_0', schema, '/allOf/2/items/0', 'properties', schema.allOf[2].items[0], 'foo_items_0'], - [schema.allOf[2].items[0].properties.bar_items_0, '/allOf/2/items/0/properties/bar_items_0', schema, '/allOf/2/items/0', 'properties', schema.allOf[2].items[0], 'bar_items_0'], - [schema.allOf[2].items[0].anyOf[0], '/allOf/2/items/0/anyOf/0', schema, '/allOf/2/items/0', 'anyOf', schema.allOf[2].items[0], 0], - [schema.allOf[2].items[0].anyOf[1], '/allOf/2/items/0/anyOf/1', schema, '/allOf/2/items/0', 'anyOf', schema.allOf[2].items[0], 1], - - [schema.allOf[2].items[1], '/allOf/2/items/1', schema, '/allOf/2', 'items', schema.allOf[2], 1], - [schema.allOf[2].items[1].properties.foo_items_1, '/allOf/2/items/1/properties/foo_items_1', schema, '/allOf/2/items/1', 'properties', schema.allOf[2].items[1], 'foo_items_1'], - [schema.allOf[2].items[1].properties.bar_items_1, '/allOf/2/items/1/properties/bar_items_1', schema, '/allOf/2/items/1', 'properties', schema.allOf[2].items[1], 'bar_items_1'], - [schema.allOf[2].items[1].anyOf[0], '/allOf/2/items/1/anyOf/0', schema, '/allOf/2/items/1', 'anyOf', schema.allOf[2].items[1], 0], - [schema.allOf[2].items[1].anyOf[1], '/allOf/2/items/1/anyOf/1', schema, '/allOf/2/items/1', 'anyOf', schema.allOf[2].items[1], 1] - ]) - .concat(expectedCallsChild('anyOf', 0)) - .concat(expectedCallsChild('anyOf', 1)) - .concat(expectedCallsChild('oneOf', 0)) - .concat(expectedCallsChild('oneOf', 1)) - .concat(expectedCallsChild('definitions', 'foo')) - .concat(expectedCallsChild('definitions', 'bar')) - .concat(expectedCallsChild('properties', 'foo')) - .concat(expectedCallsChild('properties', 'bar')) - .concat(expectedCallsChild('patternProperties', 'foo')) - .concat(expectedCallsChild('patternProperties', 'bar')) - .concat(expectedCallsChild('dependencies', 'foo')) - .concat(expectedCallsChild('dependencies', 'bar')) -}; - - -function expectedCalls(keyword) { - return [ - [schema[keyword], `/${keyword}`, schema, '', keyword, schema, undefined], - [schema[keyword].properties[`foo_${keyword}`], `/${keyword}/properties/foo_${keyword}`, schema, `/${keyword}`, 'properties', schema[keyword], `foo_${keyword}`], - [schema[keyword].properties[`bar_${keyword}`], `/${keyword}/properties/bar_${keyword}`, schema, `/${keyword}`, 'properties', schema[keyword], `bar_${keyword}`], - [schema[keyword].anyOf[0], `/${keyword}/anyOf/0`, schema, `/${keyword}`, 'anyOf', schema[keyword], 0], - [schema[keyword].anyOf[1], `/${keyword}/anyOf/1`, schema, `/${keyword}`, 'anyOf', schema[keyword], 1] - ]; -} - - -function expectedCallsChild(keyword, i) { - return [ - [schema[keyword][i], `/${keyword}/${i}`, schema, '', keyword, schema, i], - [schema[keyword][i].properties[`foo_${keyword}_${i}`], `/${keyword}/${i}/properties/foo_${keyword}_${i}`, schema, `/${keyword}/${i}`, 'properties', schema[keyword][i], `foo_${keyword}_${i}`], - [schema[keyword][i].properties[`bar_${keyword}_${i}`], `/${keyword}/${i}/properties/bar_${keyword}_${i}`, schema, `/${keyword}/${i}`, 'properties', schema[keyword][i], `bar_${keyword}_${i}`], - [schema[keyword][i].anyOf[0], `/${keyword}/${i}/anyOf/0`, schema, `/${keyword}/${i}`, 'anyOf', schema[keyword][i], 0], - [schema[keyword][i].anyOf[1], `/${keyword}/${i}/anyOf/1`, schema, `/${keyword}/${i}`, 'anyOf', schema[keyword][i], 1] - ]; -} diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/index.spec.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/index.spec.js deleted file mode 100644 index 7e66143d39..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/index.spec.js +++ /dev/null @@ -1,102 +0,0 @@ -'use strict'; - -var traverse = require('../index'); -var assert = require('assert'); - -describe('json-schema-traverse', function() { - var calls; - - beforeEach(function() { - calls = []; - }); - - it('should traverse all keywords containing schemas recursively', function() { - var schema = require('./fixtures/schema').schema; - var expectedCalls = require('./fixtures/schema').expectedCalls; - - traverse(schema, callback); - assert.deepStrictEqual(calls, expectedCalls); - }); - - - describe('allKeys option', function() { - var schema = { - someObject: { - minimum: 1, - maximum: 2 - } - }; - - it('should traverse objects with allKeys: true option', function() { - // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex - var expectedCalls = [ - [schema, '', schema, undefined, undefined, undefined, undefined], - [schema.someObject, '/someObject', schema, '', 'someObject', schema, undefined] - ]; - - traverse(schema, {allKeys: true}, callback); - assert.deepStrictEqual(calls, expectedCalls); - }); - - - it('should NOT traverse objects with allKeys: false option', function() { - // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex - var expectedCalls = [ - [schema, '', schema, undefined, undefined, undefined, undefined] - ]; - - traverse(schema, {allKeys: false}, callback); - assert.deepStrictEqual(calls, expectedCalls); - }); - - - it('should NOT traverse objects without allKeys option', function() { - // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex - var expectedCalls = [ - [schema, '', schema, undefined, undefined, undefined, undefined] - ]; - - traverse(schema, callback); - assert.deepStrictEqual(calls, expectedCalls); - }); - - - it('should NOT travers objects in standard keywords which value is not a schema', function() { - var schema2 = { - const: {foo: 'bar'}, - enum: ['a', 'b'], - required: ['foo'], - another: { - - }, - patternProperties: {}, // will not traverse - no properties - dependencies: true, // will not traverse - invalid - properties: { - smaller: { - type: 'number' - }, - larger: { - type: 'number', - minimum: {$data: '1/smaller'} - } - } - }; - - // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex - var expectedCalls = [ - [schema2, '', schema2, undefined, undefined, undefined, undefined], - [schema2.another, '/another', schema2, '', 'another', schema2, undefined], - [schema2.properties.smaller, '/properties/smaller', schema2, '', 'properties', schema2, 'smaller'], - [schema2.properties.larger, '/properties/larger', schema2, '', 'properties', schema2, 'larger'], - ]; - - traverse(schema2, {allKeys: true}, callback); - assert.deepStrictEqual(calls, expectedCalls); - }); - }); - - - function callback() { - calls.push(Array.prototype.slice.call(arguments)); - } -}); diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/.npmignore b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/.npmignore deleted file mode 100644 index 3c3629e647..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/.travis.yml b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/.travis.yml deleted file mode 100644 index cc4dba29d9..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/LICENSE b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/LICENSE deleted file mode 100644 index ee27ba4b44..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/key_cmp.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/key_cmp.js deleted file mode 100644 index d5f66752d8..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/key_cmp.js +++ /dev/null @@ -1,7 +0,0 @@ -var stringify = require('../'); - -var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; -var s = stringify(obj, function (a, b) { - return a.key < b.key ? 1 : -1; -}); -console.log(s); diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/nested.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/nested.js deleted file mode 100644 index 9a672fc65f..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/nested.js +++ /dev/null @@ -1,3 +0,0 @@ -var stringify = require('../'); -var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; -console.log(stringify(obj)); diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/str.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/str.js deleted file mode 100644 index 9b4b3cd289..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/str.js +++ /dev/null @@ -1,3 +0,0 @@ -var stringify = require('../'); -var obj = { c: 6, b: [4,5], a: 3 }; -console.log(stringify(obj)); diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/value_cmp.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/value_cmp.js deleted file mode 100644 index 09f1c5f79b..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/example/value_cmp.js +++ /dev/null @@ -1,7 +0,0 @@ -var stringify = require('../'); - -var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 }; -var s = stringify(obj, function (a, b) { - return a.value < b.value ? 1 : -1; -}); -console.log(s); diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/index.js deleted file mode 100644 index 6a4131d44e..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/index.js +++ /dev/null @@ -1,84 +0,0 @@ -var json = typeof JSON !== 'undefined' ? JSON : require('jsonify'); - -module.exports = function (obj, opts) { - if (!opts) opts = {}; - if (typeof opts === 'function') opts = { cmp: opts }; - var space = opts.space || ''; - if (typeof space === 'number') space = Array(space+1).join(' '); - var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; - var replacer = opts.replacer || function(key, value) { return value; }; - - var cmp = opts.cmp && (function (f) { - return function (node) { - return function (a, b) { - var aobj = { key: a, value: node[a] }; - var bobj = { key: b, value: node[b] }; - return f(aobj, bobj); - }; - }; - })(opts.cmp); - - var seen = []; - return (function stringify (parent, key, node, level) { - var indent = space ? ('\n' + new Array(level + 1).join(space)) : ''; - var colonSeparator = space ? ': ' : ':'; - - if (node && node.toJSON && typeof node.toJSON === 'function') { - node = node.toJSON(); - } - - node = replacer.call(parent, key, node); - - if (node === undefined) { - return; - } - if (typeof node !== 'object' || node === null) { - return json.stringify(node); - } - if (isArray(node)) { - var out = []; - for (var i = 0; i < node.length; i++) { - var item = stringify(node, i, node[i], level+1) || json.stringify(null); - out.push(indent + space + item); - } - return '[' + out.join(',') + indent + ']'; - } - else { - if (seen.indexOf(node) !== -1) { - if (cycles) return json.stringify('__cycle__'); - throw new TypeError('Converting circular structure to JSON'); - } - else seen.push(node); - - var keys = objectKeys(node).sort(cmp && cmp(node)); - var out = []; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = stringify(node, key, node[key], level+1); - - if(!value) continue; - - var keyValue = json.stringify(key) - + colonSeparator - + value; - ; - out.push(indent + space + keyValue); - } - seen.splice(seen.indexOf(node), 1); - return '{' + out.join(',') + indent + '}'; - } - })({ '': obj }, '', obj, 0); -}; - -var isArray = Array.isArray || function (x) { - return {}.toString.call(x) === '[object Array]'; -}; - -var objectKeys = Object.keys || function (obj) { - var has = Object.prototype.hasOwnProperty || function () { return true }; - var keys = []; - for (var key in obj) { - if (has.call(obj, key)) keys.push(key); - } - return keys; -}; diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/README.markdown b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/README.markdown deleted file mode 100644 index 71d9a93b59..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/README.markdown +++ /dev/null @@ -1,34 +0,0 @@ -jsonify -======= - -This module provides Douglas Crockford's JSON implementation without modifying -any globals. - -`stringify` and `parse` are merely exported without respect to whether or not a -global `JSON` object exists. - -methods -======= - -var json = require('jsonify'); - -json.parse(source, reviver) ---------------------------- - -Return a new javascript object from a parse of the `source` string. - -If a `reviver` function is specified, walk the structure passing each name/value -pair to `reviver.call(parent, key, value)` to transform the `value` before -parsing it. - -json.stringify(value, replacer, space) --------------------------------------- - -Return a string representation for `value`. - -If `replacer` is specified, walk the structure passing each name/value pair to -`replacer.call(parent, key, value)` to transform the `value` before stringifying -it. - -If `space` is a number, indent the result by that many spaces. -If `space` is a string, use `space` as the indentation. diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/index.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/index.js deleted file mode 100644 index f728a1605a..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/index.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.parse = require('./lib/parse'); -exports.stringify = require('./lib/stringify'); diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/lib/parse.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/lib/parse.js deleted file mode 100644 index 2b88cfff0b..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/lib/parse.js +++ /dev/null @@ -1,273 +0,0 @@ -var at, // The index of the current character - ch, // The current character - escapee = { - '"': '"', - '\\': '\\', - '/': '/', - b: '\b', - f: '\f', - n: '\n', - r: '\r', - t: '\t' - }, - text, - - error = function (m) { - // Call error when something is wrong. - throw { - name: 'SyntaxError', - message: m, - at: at, - text: text - }; - }, - - next = function (c) { - // If a c parameter is provided, verify that it matches the current character. - if (c && c !== ch) { - error("Expected '" + c + "' instead of '" + ch + "'"); - } - - // Get the next character. When there are no more characters, - // return the empty string. - - ch = text.charAt(at); - at += 1; - return ch; - }, - - number = function () { - // Parse a number value. - var number, - string = ''; - - if (ch === '-') { - string = '-'; - next('-'); - } - while (ch >= '0' && ch <= '9') { - string += ch; - next(); - } - if (ch === '.') { - string += '.'; - while (next() && ch >= '0' && ch <= '9') { - string += ch; - } - } - if (ch === 'e' || ch === 'E') { - string += ch; - next(); - if (ch === '-' || ch === '+') { - string += ch; - next(); - } - while (ch >= '0' && ch <= '9') { - string += ch; - next(); - } - } - number = +string; - if (!isFinite(number)) { - error("Bad number"); - } else { - return number; - } - }, - - string = function () { - // Parse a string value. - var hex, - i, - string = '', - uffff; - - // When parsing for string values, we must look for " and \ characters. - if (ch === '"') { - while (next()) { - if (ch === '"') { - next(); - return string; - } else if (ch === '\\') { - next(); - if (ch === 'u') { - uffff = 0; - for (i = 0; i < 4; i += 1) { - hex = parseInt(next(), 16); - if (!isFinite(hex)) { - break; - } - uffff = uffff * 16 + hex; - } - string += String.fromCharCode(uffff); - } else if (typeof escapee[ch] === 'string') { - string += escapee[ch]; - } else { - break; - } - } else { - string += ch; - } - } - } - error("Bad string"); - }, - - white = function () { - -// Skip whitespace. - - while (ch && ch <= ' ') { - next(); - } - }, - - word = function () { - -// true, false, or null. - - switch (ch) { - case 't': - next('t'); - next('r'); - next('u'); - next('e'); - return true; - case 'f': - next('f'); - next('a'); - next('l'); - next('s'); - next('e'); - return false; - case 'n': - next('n'); - next('u'); - next('l'); - next('l'); - return null; - } - error("Unexpected '" + ch + "'"); - }, - - value, // Place holder for the value function. - - array = function () { - -// Parse an array value. - - var array = []; - - if (ch === '[') { - next('['); - white(); - if (ch === ']') { - next(']'); - return array; // empty array - } - while (ch) { - array.push(value()); - white(); - if (ch === ']') { - next(']'); - return array; - } - next(','); - white(); - } - } - error("Bad array"); - }, - - object = function () { - -// Parse an object value. - - var key, - object = {}; - - if (ch === '{') { - next('{'); - white(); - if (ch === '}') { - next('}'); - return object; // empty object - } - while (ch) { - key = string(); - white(); - next(':'); - if (Object.hasOwnProperty.call(object, key)) { - error('Duplicate key "' + key + '"'); - } - object[key] = value(); - white(); - if (ch === '}') { - next('}'); - return object; - } - next(','); - white(); - } - } - error("Bad object"); - }; - -value = function () { - -// Parse a JSON value. It could be an object, an array, a string, a number, -// or a word. - - white(); - switch (ch) { - case '{': - return object(); - case '[': - return array(); - case '"': - return string(); - case '-': - return number(); - default: - return ch >= '0' && ch <= '9' ? number() : word(); - } -}; - -// Return the json_parse function. It will have access to all of the above -// functions and variables. - -module.exports = function (source, reviver) { - var result; - - text = source; - at = 0; - ch = ' '; - result = value(); - white(); - if (ch) { - error("Syntax error"); - } - - // If there is a reviver function, we recursively walk the new structure, - // passing each name/value pair to the reviver function for possible - // transformation, starting with a temporary root object that holds the result - // in an empty key. If there is not a reviver function, we simply return the - // result. - - return typeof reviver === 'function' ? (function walk(holder, key) { - var k, v, value = holder[key]; - if (value && typeof value === 'object') { - for (k in value) { - if (Object.prototype.hasOwnProperty.call(value, k)) { - v = walk(value, k); - if (v !== undefined) { - value[k] = v; - } else { - delete value[k]; - } - } - } - } - return reviver.call(holder, key, value); - }({'': result}, '')) : result; -}; diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/lib/stringify.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/lib/stringify.js deleted file mode 100644 index e88fb83406..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/lib/stringify.js +++ /dev/null @@ -1,154 +0,0 @@ -var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - gap, - indent, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - rep; - -function quote(string) { - // If the string contains no control characters, no quote characters, and no - // backslash characters, then we can safely slap some quotes around it. - // Otherwise we must also replace the offending characters with safe escape - // sequences. - - escapable.lastIndex = 0; - return escapable.test(string) ? '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' ? c : - '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : '"' + string + '"'; -} - -function str(key, holder) { - // Produce a string from holder[key]. - var i, // The loop counter. - k, // The member key. - v, // The member value. - length, - mind = gap, - partial, - value = holder[key]; - - // If the value has a toJSON method, call it to obtain a replacement value. - if (value && typeof value === 'object' && - typeof value.toJSON === 'function') { - value = value.toJSON(key); - } - - // If we were called with a replacer function, then call the replacer to - // obtain a replacement value. - if (typeof rep === 'function') { - value = rep.call(holder, key, value); - } - - // What happens next depends on the value's type. - switch (typeof value) { - case 'string': - return quote(value); - - case 'number': - // JSON numbers must be finite. Encode non-finite numbers as null. - return isFinite(value) ? String(value) : 'null'; - - case 'boolean': - case 'null': - // If the value is a boolean or null, convert it to a string. Note: - // typeof null does not produce 'null'. The case is included here in - // the remote chance that this gets fixed someday. - return String(value); - - case 'object': - if (!value) return 'null'; - gap += indent; - partial = []; - - // Array.isArray - if (Object.prototype.toString.apply(value) === '[object Array]') { - length = value.length; - for (i = 0; i < length; i += 1) { - partial[i] = str(i, value) || 'null'; - } - - // Join all of the elements together, separated with commas, and - // wrap them in brackets. - v = partial.length === 0 ? '[]' : gap ? - '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : - '[' + partial.join(',') + ']'; - gap = mind; - return v; - } - - // If the replacer is an array, use it to select the members to be - // stringified. - if (rep && typeof rep === 'object') { - length = rep.length; - for (i = 0; i < length; i += 1) { - k = rep[i]; - if (typeof k === 'string') { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } - else { - // Otherwise, iterate through all of the keys in the object. - for (k in value) { - if (Object.prototype.hasOwnProperty.call(value, k)) { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } - - // Join all of the member texts together, separated with commas, - // and wrap them in braces. - - v = partial.length === 0 ? '{}' : gap ? - '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : - '{' + partial.join(',') + '}'; - gap = mind; - return v; - } -} - -module.exports = function (value, replacer, space) { - var i; - gap = ''; - indent = ''; - - // If the space parameter is a number, make an indent string containing that - // many spaces. - if (typeof space === 'number') { - for (i = 0; i < space; i += 1) { - indent += ' '; - } - } - // If the space parameter is a string, it will be used as the indent string. - else if (typeof space === 'string') { - indent = space; - } - - // If there is a replacer, it must be a function or an array. - // Otherwise, throw an error. - rep = replacer; - if (replacer && typeof replacer !== 'function' - && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) { - throw new Error('JSON.stringify'); - } - - // Make a fake root object containing our value under the key of ''. - // Return the result of stringifying the value. - return str('', {'': value}); -}; diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/package.json deleted file mode 100644 index 8d84d72717..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_from": "jsonify@~0.0.0", - "_id": "jsonify@0.0.0", - "_integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "_location": "/request/har-validator/ajv/json-stable-stringify/jsonify", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "jsonify@~0.0.0", - "name": "jsonify", - "escapedName": "jsonify", - "rawSpec": "~0.0.0", - "saveSpec": null, - "fetchSpec": "~0.0.0" - }, - "_requiredBy": [ - "/request/har-validator/ajv/json-stable-stringify" - ], - "_resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "_shasum": "2c74b6ee41d93ca51b7b5aaee8f503631d252a73", - "_shrinkwrap": null, - "_spec": "jsonify@~0.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify", - "author": { - "name": "Douglas Crockford", - "url": "http://crockford.com/" - }, - "bin": null, - "bugs": { - "url": "https://github.com/substack/jsonify/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "JSON without touching any globals", - "devDependencies": { - "garbage": "0.0.x", - "tap": "0.0.x" - }, - "directories": { - "lib": ".", - "test": "test" - }, - "engines": { - "node": "*" - }, - "homepage": "https://github.com/substack/jsonify#readme", - "keywords": [ - "json", - "browser" - ], - "license": "Public Domain", - "main": "index.js", - "name": "jsonify", - "optionalDependencies": {}, - "peerDependencies": {}, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/substack/jsonify.git" - }, - "scripts": { - "test": "tap test" - }, - "version": "0.0.0" -} diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/test/parse.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/test/parse.js deleted file mode 100644 index d23de157e1..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/test/parse.js +++ /dev/null @@ -1,16 +0,0 @@ -var test = require('tap').test; -var json = require('../'); -var garbage = require('garbage'); - -test('parse', function (t) { - for (var i = 0; i < 50; i++) { - var s = JSON.stringify(garbage(50)); - - t.deepEqual( - json.parse(s), - JSON.parse(s) - ); - } - - t.end(); -}); diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/test/stringify.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/test/stringify.js deleted file mode 100644 index 72de91f2b6..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/node_modules/jsonify/test/stringify.js +++ /dev/null @@ -1,15 +0,0 @@ -var test = require('tap').test; -var json = require('../'); -var garbage = require('garbage'); - -test('stringify', function (t) { - for (var i = 0; i < 50; i++) { - var obj = garbage(50); - t.equal( - json.stringify(obj), - JSON.stringify(obj) - ); - } - - t.end(); -}); diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/package.json b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/package.json deleted file mode 100644 index f7e9bc1899..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_from": "json-stable-stringify@^1.0.1", - "_id": "json-stable-stringify@1.0.1", - "_integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "_location": "/request/har-validator/ajv/json-stable-stringify", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "json-stable-stringify@^1.0.1", - "name": "json-stable-stringify", - "escapedName": "json-stable-stringify", - "rawSpec": "^1.0.1", - "saveSpec": null, - "fetchSpec": "^1.0.1" - }, - "_requiredBy": [ - "/request/har-validator/ajv" - ], - "_resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "_shasum": "9a759d39c5f2ff503fd5300646ed445f88c4f9af", - "_shrinkwrap": null, - "_spec": "json-stable-stringify@^1.0.1", - "_where": "/Users/zkat/Documents/code/npm/node_modules/request/node_modules/har-validator/node_modules/ajv", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bin": null, - "bugs": { - "url": "https://github.com/substack/json-stable-stringify/issues" - }, - "bundleDependencies": false, - "dependencies": { - "jsonify": "~0.0.0" - }, - "deprecated": false, - "description": "deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results", - "devDependencies": { - "tape": "~1.0.4" - }, - "homepage": "https://github.com/substack/json-stable-stringify", - "keywords": [ - "json", - "stringify", - "deterministic", - "hash", - "sort", - "stable" - ], - "license": "MIT", - "main": "index.js", - "name": "json-stable-stringify", - "optionalDependencies": {}, - "peerDependencies": {}, - "repository": { - "type": "git", - "url": "git://github.com/substack/json-stable-stringify.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "ff/5", - "ff/latest", - "chrome/15", - "chrome/latest", - "safari/latest", - "opera/latest" - ] - }, - "version": "1.0.1" -} diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/readme.markdown b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/readme.markdown deleted file mode 100644 index 406c3c7261..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/readme.markdown +++ /dev/null @@ -1,130 +0,0 @@ -# json-stable-stringify - -deterministic version of `JSON.stringify()` so you can get a consistent hash -from stringified results - -You can also pass in a custom comparison function. - -[![browser support](https://ci.testling.com/substack/json-stable-stringify.png)](https://ci.testling.com/substack/json-stable-stringify) - -[![build status](https://secure.travis-ci.org/substack/json-stable-stringify.png)](http://travis-ci.org/substack/json-stable-stringify) - -# example - -``` js -var stringify = require('json-stable-stringify'); -var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; -console.log(stringify(obj)); -``` - -output: - -``` -{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8} -``` - -# methods - -``` js -var stringify = require('json-stable-stringify') -``` - -## var str = stringify(obj, opts) - -Return a deterministic stringified string `str` from the object `obj`. - -## options - -### cmp - -If `opts` is given, you can supply an `opts.cmp` to have a custom comparison -function for object keys. Your function `opts.cmp` is called with these -parameters: - -``` js -opts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue }) -``` - -For example, to sort on the object key names in reverse order you could write: - -``` js -var stringify = require('json-stable-stringify'); - -var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; -var s = stringify(obj, function (a, b) { - return a.key < b.key ? 1 : -1; -}); -console.log(s); -``` - -which results in the output string: - -``` -{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3} -``` - -Or if you wanted to sort on the object values in reverse order, you could write: - -``` -var stringify = require('json-stable-stringify'); - -var obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 }; -var s = stringify(obj, function (a, b) { - return a.value < b.value ? 1 : -1; -}); -console.log(s); -``` - -which outputs: - -``` -{"d":6,"c":5,"b":[{"z":3,"y":2,"x":1},9],"a":10} -``` - -### space - -If you specify `opts.space`, it will indent the output for pretty-printing. -Valid values are strings (e.g. `{space: \t}`) or a number of spaces -(`{space: 3}`). - -For example: - -```js -var obj = { b: 1, a: { foo: 'bar', and: [1, 2, 3] } }; -var s = stringify(obj, { space: ' ' }); -console.log(s); -``` - -which outputs: - -``` -{ - "a": { - "and": [ - 1, - 2, - 3 - ], - "foo": "bar" - }, - "b": 1 -} -``` - -### replacer - -The replacer parameter is a function `opts.replacer(key, value)` that behaves -the same as the replacer -[from the core JSON object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_native_JSON#The_replacer_parameter). - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install json-stable-stringify -``` - -# license - -MIT diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/cmp.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/cmp.js deleted file mode 100644 index 2dbb39355c..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/cmp.js +++ /dev/null @@ -1,11 +0,0 @@ -var test = require('tape'); -var stringify = require('../'); - -test('custom comparison function', function (t) { - t.plan(1); - var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; - var s = stringify(obj, function (a, b) { - return a.key < b.key ? 1 : -1; - }); - t.equal(s, '{"c":8,"b":[{"z":6,"y":5,"x":4},7],"a":3}'); -}); diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/nested.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/nested.js deleted file mode 100644 index e7f5a0e65b..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/nested.js +++ /dev/null @@ -1,35 +0,0 @@ -var test = require('tape'); -var stringify = require('../'); - -test('nested', function (t) { - t.plan(1); - var obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 }; - t.equal(stringify(obj), '{"a":3,"b":[{"x":4,"y":5,"z":6},7],"c":8}'); -}); - -test('cyclic (default)', function (t) { - t.plan(1); - var one = { a: 1 }; - var two = { a: 2, one: one }; - one.two = two; - try { - stringify(one); - } catch (ex) { - t.equal(ex.toString(), 'TypeError: Converting circular structure to JSON'); - } -}); - -test('cyclic (specifically allowed)', function (t) { - t.plan(1); - var one = { a: 1 }; - var two = { a: 2, one: one }; - one.two = two; - t.equal(stringify(one, {cycles:true}), '{"a":1,"two":{"a":2,"one":"__cycle__"}}'); -}); - -test('repeated non-cyclic value', function(t) { - t.plan(1); - var one = { x: 1 }; - var two = { a: one, b: one }; - t.equal(stringify(two), '{"a":{"x":1},"b":{"x":1}}'); -}); diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/replacer.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/replacer.js deleted file mode 100644 index 98802a72d6..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/replacer.js +++ /dev/null @@ -1,74 +0,0 @@ -var test = require('tape'); -var stringify = require('../'); - -test('replace root', function (t) { - t.plan(1); - - var obj = { a: 1, b: 2, c: false }; - var replacer = function(key, value) { return 'one'; }; - - t.equal(stringify(obj, { replacer: replacer }), '"one"'); -}); - -test('replace numbers', function (t) { - t.plan(1); - - var obj = { a: 1, b: 2, c: false }; - var replacer = function(key, value) { - if(value === 1) return 'one'; - if(value === 2) return 'two'; - return value; - }; - - t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":"two","c":false}'); -}); - -test('replace with object', function (t) { - t.plan(1); - - var obj = { a: 1, b: 2, c: false }; - var replacer = function(key, value) { - if(key === 'b') return { d: 1 }; - if(value === 1) return 'one'; - return value; - }; - - t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":{"d":"one"},"c":false}'); -}); - -test('replace with undefined', function (t) { - t.plan(1); - - var obj = { a: 1, b: 2, c: false }; - var replacer = function(key, value) { - if(value === false) return; - return value; - }; - - t.equal(stringify(obj, { replacer: replacer }), '{"a":1,"b":2}'); -}); - -test('replace with array', function (t) { - t.plan(1); - - var obj = { a: 1, b: 2, c: false }; - var replacer = function(key, value) { - if(key === 'b') return ['one', 'two']; - return value; - }; - - t.equal(stringify(obj, { replacer: replacer }), '{"a":1,"b":["one","two"],"c":false}'); -}); - -test('replace array item', function (t) { - t.plan(1); - - var obj = { a: 1, b: 2, c: [1,2] }; - var replacer = function(key, value) { - if(value === 1) return 'one'; - if(value === 2) return 'two'; - return value; - }; - - t.equal(stringify(obj, { replacer: replacer }), '{"a":"one","b":"two","c":["one","two"]}'); -}); diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/space.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/space.js deleted file mode 100644 index 2621122ae3..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/space.js +++ /dev/null @@ -1,59 +0,0 @@ -var test = require('tape'); -var stringify = require('../'); - -test('space parameter', function (t) { - t.plan(1); - var obj = { one: 1, two: 2 }; - t.equal(stringify(obj, {space: ' '}), '' - + '{\n' - + ' "one": 1,\n' - + ' "two": 2\n' - + '}' - ); -}); - -test('space parameter (with tabs)', function (t) { - t.plan(1); - var obj = { one: 1, two: 2 }; - t.equal(stringify(obj, {space: '\t'}), '' - + '{\n' - + '\t"one": 1,\n' - + '\t"two": 2\n' - + '}' - ); -}); - -test('space parameter (with a number)', function (t) { - t.plan(1); - var obj = { one: 1, two: 2 }; - t.equal(stringify(obj, {space: 3}), '' - + '{\n' - + ' "one": 1,\n' - + ' "two": 2\n' - + '}' - ); -}); - -test('space parameter (nested objects)', function (t) { - t.plan(1); - var obj = { one: 1, two: { b: 4, a: [2,3] } }; - t.equal(stringify(obj, {space: ' '}), '' - + '{\n' - + ' "one": 1,\n' - + ' "two": {\n' - + ' "a": [\n' - + ' 2,\n' - + ' 3\n' - + ' ],\n' - + ' "b": 4\n' - + ' }\n' - + '}' - ); -}); - -test('space parameter (same as native)', function (t) { - t.plan(1); - // for this test, properties need to be in alphabetical order - var obj = { one: 1, two: { a: [2,3], b: 4 } }; - t.equal(stringify(obj, {space: ' '}), JSON.stringify(obj, null, ' ')); -}); diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/str.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/str.js deleted file mode 100644 index 67426b99e3..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/str.js +++ /dev/null @@ -1,32 +0,0 @@ -var test = require('tape'); -var stringify = require('../'); - -test('simple object', function (t) { - t.plan(1); - var obj = { c: 6, b: [4,5], a: 3, z: null }; - t.equal(stringify(obj), '{"a":3,"b":[4,5],"c":6,"z":null}'); -}); - -test('object with undefined', function (t) { - t.plan(1); - var obj = { a: 3, z: undefined }; - t.equal(stringify(obj), '{"a":3}'); -}); - -test('array with undefined', function (t) { - t.plan(1); - var obj = [4, undefined, 6]; - t.equal(stringify(obj), '[4,null,6]'); -}); - -test('object with empty string', function (t) { - t.plan(1); - var obj = { a: 3, z: '' }; - t.equal(stringify(obj), '{"a":3,"z":""}'); -}); - -test('array with empty string', function (t) { - t.plan(1); - var obj = [4, '', 6]; - t.equal(stringify(obj), '[4,"",6]'); -}); diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/to-json.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/to-json.js deleted file mode 100644 index ef9a980929..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-stable-stringify/test/to-json.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tape'); -var stringify = require('../'); - -test('toJSON function', function (t) { - t.plan(1); - var obj = { one: 1, two: 2, toJSON: function() { return { one: 1 }; } }; - t.equal(stringify(obj), '{"one":1}' ); -}); - -test('toJSON returns string', function (t) { - t.plan(1); - var obj = { one: 1, two: 2, toJSON: function() { return 'one'; } }; - t.equal(stringify(obj), '"one"'); -}); - -test('toJSON returns array', function (t) { - t.plan(1); - var obj = { one: 1, two: 2, toJSON: function() { return ['one']; } }; - t.equal(stringify(obj), '["one"]'); -}); |