First commit
This commit is contained in:
22
hGameTest/node_modules/deep-equal/.eslintrc
generated
vendored
Normal file
22
hGameTest/node_modules/deep-equal/.eslintrc
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"root": true,
|
||||
"extends": "@ljharb",
|
||||
"rules": {
|
||||
"complexity": 0,
|
||||
"eqeqeq": 1,
|
||||
"func-style": [2, "declaration"],
|
||||
"indent": [2, 2],
|
||||
"max-params": [2, 3],
|
||||
"max-statements-per-line": [2, { "max": 2 }],
|
||||
"strict": 1,
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["example/**", "test/**"],
|
||||
"rules": {
|
||||
"max-params": 0,
|
||||
"no-console": 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
12
hGameTest/node_modules/deep-equal/.travis.yml
generated
vendored
Normal file
12
hGameTest/node_modules/deep-equal/.travis.yml
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
version: ~> 1.0
|
||||
language: node_js
|
||||
os:
|
||||
- linux
|
||||
import:
|
||||
- ljharb/travis-ci:node/all.yml
|
||||
- ljharb/travis-ci:node/pretest.yml
|
||||
- ljharb/travis-ci:node/posttest.yml
|
||||
- ljharb/travis-ci:node/coverage.yml
|
||||
matrix:
|
||||
allow_failures:
|
||||
- env: COVERAGE=true
|
||||
120
hGameTest/node_modules/deep-equal/CHANGELOG.md
generated
vendored
Normal file
120
hGameTest/node_modules/deep-equal/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
|
||||
## [v1.1.1](https://github.com/inspect-js/node-deep-equal/compare/v1.1.0...v1.1.1) - 2019-11-12
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] use shared travis-ci configs [`678cb2a`](https://github.com/inspect-js/node-deep-equal/commit/678cb2a34ef920eab563af69bdf402b9273c3e2c)
|
||||
- [meta] add `auto-changelog` [`569bcce`](https://github.com/inspect-js/node-deep-equal/commit/569bcce030784f7506367055122c54c6cac00ebc)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`; add `safe-publish-latest` [`9dedd40`](https://github.com/inspect-js/node-deep-equal/commit/9dedd409cb74c538153287db546a14f2fa583e6f)
|
||||
- [Tests] add `npx aud` in `posttest` [`0b76639`](https://github.com/inspect-js/node-deep-equal/commit/0b766394504f74d002ad85e7b8244ce89bb27130)
|
||||
- [meta] add `funding` field [`3e519e3`](https://github.com/inspect-js/node-deep-equal/commit/3e519e36998ea82120cfe9a509dc0090a87d7063)
|
||||
|
||||
## [v1.1.0](https://github.com/inspect-js/node-deep-equal/compare/v1.0.1...v1.1.0) - 2019-08-28
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] up to `node` `v12.7`, `v11.15`, `v10.16`, `v9.11`, `v8.16`, `v7.10`, `v6.17`, `4.9`; use `nvm install-latest-npm` [`ba11166`](https://github.com/inspect-js/node-deep-equal/commit/ba111664928f3a9279528dd05330b974950003b4)
|
||||
- [Tests] make a `tape` helper, to easily compare loose/strict, and (a,b)/(b,a) arg order [`0c25e94`](https://github.com/inspect-js/node-deep-equal/commit/0c25e9438b2d4a96e75c3c2e6fbb353ae450ed1f)
|
||||
- [Tests] add `npm run lint` [`8590816`](https://github.com/inspect-js/node-deep-equal/commit/8590816be6bc57a07fbc160985f5f04f11c7fa97)
|
||||
- test: Fails simple array tests on IE < 9 #10 [`bc37498`](https://github.com/inspect-js/node-deep-equal/commit/bc374988ee763a881ef39d8f6949838ec4df4e64)
|
||||
- [Tests] clean up/flesh out test cases [`3fffed9`](https://github.com/inspect-js/node-deep-equal/commit/3fffed9a7e095bbf922561fa0b18681422861af8)
|
||||
- [Fix] (array,arguments) now behaves the same as (arguments,array) [`a9528ff`](https://github.com/inspect-js/node-deep-equal/commit/a9528ff71561c303e722eb5ae0a3b9b2ecae4a3b)
|
||||
- [Refactor] move Date and RegExp tests into `objEquiv` [`5b3bf31`](https://github.com/inspect-js/node-deep-equal/commit/5b3bf315b603f00bab49e78c05c075cdc0dfd506)
|
||||
- [Fix] properly compare RegExp objects [`b8c179c`](https://github.com/inspect-js/node-deep-equal/commit/b8c179c5aa91c8a2f71f053e2d9e2d477780250e)
|
||||
- [Refactor] Use `object-keys` and `is-arguments` instead of a homegrown shim. [`3b503fb`](https://github.com/inspect-js/node-deep-equal/commit/3b503fb262c431df72a6c91cbb384be557315645)
|
||||
- [Fix] use `object-is` to support `NaN` and `-0` properly [`28fde4a`](https://github.com/inspect-js/node-deep-equal/commit/28fde4a411073e3131d3637248f8c25aac9329f2)
|
||||
- [meta] fix license text so GitHub can detect it [`7000403`](https://github.com/inspect-js/node-deep-equal/commit/700040347119ce46b3e917e800d87628af1384f9)
|
||||
- [Tests] add array/object tests [`558eecf`](https://github.com/inspect-js/node-deep-equal/commit/558eecf9daa815468f0bc4c9799041507b7ffa15)
|
||||
- [Fix] ensure Buffer + non-Buffer comparison order does not matter [`de4e75c`](https://github.com/inspect-js/node-deep-equal/commit/de4e75ce7f0621cdc09ae8cbdc82de9e4c17578e)
|
||||
- [Refactor] `objEquiv`: bail early if typeofs are different [`410e2d6`](https://github.com/inspect-js/node-deep-equal/commit/410e2d63730763e7e92c9b45b916f97058ab31f7)
|
||||
- [Tests] add tests for `Object.create(null)` [`ed266e8`](https://github.com/inspect-js/node-deep-equal/commit/ed266e8571d1efdbb4ece0a01f849cbc57461076)
|
||||
- [Refactor] there is no need to do further compareation when two types are not equal [`6a5efc1`](https://github.com/inspect-js/node-deep-equal/commit/6a5efc130e96398de55cf517969746c52735f34b)
|
||||
- Only apps should have lockfiles [`f60442f`](https://github.com/inspect-js/node-deep-equal/commit/f60442fa6fd10004366d80481ada7df668bd6adb)
|
||||
- [Tests] clean up redundant test [`cbbef21`](https://github.com/inspect-js/node-deep-equal/commit/cbbef21045e3b2e1ee30f6d0a83381d489df296e)
|
||||
- [Fix] use `is-date-object` to properly detect cross-realm Dates [`0c5b21a`](https://github.com/inspect-js/node-deep-equal/commit/0c5b21ad245d1427caefe20b2bace752cbe5e493)
|
||||
- [meta] Add copyright statements [`56a7746`](https://github.com/inspect-js/node-deep-equal/commit/56a774674f55bb3e0627aaec4dda90e4a06df7d6)
|
||||
- [Dev Deps] update `tape` [`3e9c1b9`](https://github.com/inspect-js/node-deep-equal/commit/3e9c1b903703e32bbed45fddcae815eb25822fd4)
|
||||
|
||||
## [v1.0.1](https://github.com/inspect-js/node-deep-equal/compare/v1.0.0...v1.0.1) - 2015-08-29
|
||||
|
||||
### Fixed
|
||||
|
||||
- Null should == undefined [`#23`](https://github.com/inspect-js/node-deep-equal/issues/23)
|
||||
|
||||
### Commits
|
||||
|
||||
- Update travis.yml to modern node [`5055802`](https://github.com/inspect-js/node-deep-equal/commit/5055802274a85a3e1493fa1b7378499554c6a4dc)
|
||||
|
||||
## [v1.0.0](https://github.com/inspect-js/node-deep-equal/compare/v0.2.2...v1.0.0) - 2015-02-07
|
||||
|
||||
## [v0.2.2](https://github.com/inspect-js/node-deep-equal/compare/v0.2.1...v0.2.2) - 2015-02-07
|
||||
|
||||
### Commits
|
||||
|
||||
- latest tape [`1d18617`](https://github.com/inspect-js/node-deep-equal/commit/1d18617608316a034c8ee6727838c9b82614f0f9)
|
||||
- add type check to support browsers [`3acb0d7`](https://github.com/inspect-js/node-deep-equal/commit/3acb0d7fb8915fb7f1ca97701b5761793738bad3)
|
||||
|
||||
## [v0.2.1](https://github.com/inspect-js/node-deep-equal/compare/v0.2.0...v0.2.1) - 2014-01-29
|
||||
|
||||
### Commits
|
||||
|
||||
- license file [`b3431d4`](https://github.com/inspect-js/node-deep-equal/commit/b3431d48e0f7c406a08d0e077f2dd9580d4561ae)
|
||||
|
||||
## [v0.2.0](https://github.com/inspect-js/node-deep-equal/compare/v0.1.2...v0.2.0) - 2014-01-29
|
||||
|
||||
### Commits
|
||||
|
||||
- buffer check without Buffer [`5271f39`](https://github.com/inspect-js/node-deep-equal/commit/5271f39f3ce61fecb71fa6ca28cb4a8a8b963bbd)
|
||||
- failing test for buffer comparison [`cc8990b`](https://github.com/inspect-js/node-deep-equal/commit/cc8990b9d84a2267d84253e21c9f7db238e961e9)
|
||||
|
||||
## [v0.1.2](https://github.com/inspect-js/node-deep-equal/compare/v0.1.1...v0.1.2) - 2013-12-21
|
||||
|
||||
### Commits
|
||||
|
||||
- test the arguments shim and properly factor out the arguments handling [`cf88b9c`](https://github.com/inspect-js/node-deep-equal/commit/cf88b9c2e87d6050ba1a46a82be216d0244ee428)
|
||||
- more coverage for the keys shim [`7a41f0e`](https://github.com/inspect-js/node-deep-equal/commit/7a41f0ec813616b0e1272c2bf463028a84d51c99)
|
||||
- test coverage for the non-object case [`abd3358`](https://github.com/inspect-js/node-deep-equal/commit/abd33586af0006e8492bbcdb1eb27a306359b03c)
|
||||
- fix the argument comparisons to properly call equal() [`0114a10`](https://github.com/inspect-js/node-deep-equal/commit/0114a10398e386ab0e073966e8525cd2ce125de4)
|
||||
- more code coverage for date comparisons [`41ac40e`](https://github.com/inspect-js/node-deep-equal/commit/41ac40e844b10833a75a39ea92e73bcdb1ae3cd9)
|
||||
- use the latest version of tape [`f8341cb`](https://github.com/inspect-js/node-deep-equal/commit/f8341cbff475ee7ee1ec651662cb5bd621c75838)
|
||||
- use https: for the badges [`514b332`](https://github.com/inspect-js/node-deep-equal/commit/514b332e9c2390c89c5beac8cf866c2f9a4afa9e)
|
||||
- 100% coverage [`e55aac7`](https://github.com/inspect-js/node-deep-equal/commit/e55aac78a6e013d6f5a10febc7009476a8f10ca5)
|
||||
|
||||
## [v0.1.1](https://github.com/inspect-js/node-deep-equal/compare/v0.1.0...v0.1.1) - 2013-12-20
|
||||
|
||||
### Commits
|
||||
|
||||
- Fixed arguments support for IE8- [`174d41a`](https://github.com/inspect-js/node-deep-equal/commit/174d41a5559820458648d237ebedfe78e44f7430)
|
||||
|
||||
## [v0.1.0](https://github.com/inspect-js/node-deep-equal/compare/v0.0.0...v0.1.0) - 2013-10-14
|
||||
|
||||
### Commits
|
||||
|
||||
- upgrade the markdown [`30e1f8f`](https://github.com/inspect-js/node-deep-equal/commit/30e1f8fe5b1fb7d5d68b156bf69bb04a7bb807a3)
|
||||
- opts.strict instead of a boolean arg [`58cbdb2`](https://github.com/inspect-js/node-deep-equal/commit/58cbdb2a97e623a68310833218af5ada6c97c2ce)
|
||||
- using testling-ci [`064af17`](https://github.com/inspect-js/node-deep-equal/commit/064af170f895fc67ec4bbf654e7de27721cf40c0)
|
||||
- Add optional strict parameter [`f3413b1`](https://github.com/inspect-js/node-deep-equal/commit/f3413b1d95e261f735939fbcaee65e598fe92852)
|
||||
- strict equality test [`281189b`](https://github.com/inspect-js/node-deep-equal/commit/281189b6962c9c57105474d01a8127da3318f555)
|
||||
- document opts.strict [`69fae5a`](https://github.com/inspect-js/node-deep-equal/commit/69fae5ab4b9278e28d09864c62dcfe9b4f00c1d8)
|
||||
- using tape [`4384db8`](https://github.com/inspect-js/node-deep-equal/commit/4384db8a9cc7af1cf79e1976d1b36e66934b2b4c)
|
||||
- using travis [`e508692`](https://github.com/inspect-js/node-deep-equal/commit/e5086928e1edf120d227d5e7f5e6ac4d755248a1)
|
||||
- deepEquals comparing nulls seems to break in ie6-8 [`b2cfeb9`](https://github.com/inspect-js/node-deep-equal/commit/b2cfeb95da6982f8bc2e676231820a3a47385db3)
|
||||
- performance note in the readme [`da9bfc9`](https://github.com/inspect-js/node-deep-equal/commit/da9bfc9aadfb9045bbf8157e9403de7184b404fd)
|
||||
- more firefoxes [`3d60ec5`](https://github.com/inspect-js/node-deep-equal/commit/3d60ec58d6fe269c13c5be04b749f01972aa5b1c)
|
||||
|
||||
## v0.0.0 - 2012-02-11
|
||||
|
||||
### Commits
|
||||
|
||||
- implementation with an example [`2dd56f9`](https://github.com/inspect-js/node-deep-equal/commit/2dd56f9e6d42e841c74289c2e2d489047d077622)
|
||||
- readme [`4a44f99`](https://github.com/inspect-js/node-deep-equal/commit/4a44f99bea3277e32d9842d9d49ac21f316ac74d)
|
||||
- and a test [`357ccd3`](https://github.com/inspect-js/node-deep-equal/commit/357ccd37d23ba7814c8fe284d36d6e86a39b7526)
|
||||
- actually just MIT [`3d348c8`](https://github.com/inspect-js/node-deep-equal/commit/3d348c88fc92ce1d69a3fedbb2aa8cb6ea1480f7)
|
||||
21
hGameTest/node_modules/deep-equal/LICENSE
generated
vendored
Normal file
21
hGameTest/node_modules/deep-equal/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2012, 2013, 2014 James Halliday <mail@substack.net>, 2009 Thomas Robinson <280north.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
11
hGameTest/node_modules/deep-equal/example/cmp.js
generated
vendored
Normal file
11
hGameTest/node_modules/deep-equal/example/cmp.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
var equal = require('../');
|
||||
console.dir([
|
||||
equal(
|
||||
{ a: [2, 3], b: [4] },
|
||||
{ a: [2, 3], b: [4] }
|
||||
),
|
||||
equal(
|
||||
{ x: 5, y: [6] },
|
||||
{ x: 5, y: 6 }
|
||||
)
|
||||
]);
|
||||
112
hGameTest/node_modules/deep-equal/index.js
generated
vendored
Normal file
112
hGameTest/node_modules/deep-equal/index.js
generated
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
var objectKeys = require('object-keys');
|
||||
var isArguments = require('is-arguments');
|
||||
var is = require('object-is');
|
||||
var isRegex = require('is-regex');
|
||||
var flags = require('regexp.prototype.flags');
|
||||
var isDate = require('is-date-object');
|
||||
|
||||
var getTime = Date.prototype.getTime;
|
||||
|
||||
function deepEqual(actual, expected, options) {
|
||||
var opts = options || {};
|
||||
|
||||
// 7.1. All identical values are equivalent, as determined by ===.
|
||||
if (opts.strict ? is(actual, expected) : actual === expected) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==.
|
||||
if (!actual || !expected || (typeof actual !== 'object' && typeof expected !== 'object')) {
|
||||
return opts.strict ? is(actual, expected) : actual == expected;
|
||||
}
|
||||
|
||||
/*
|
||||
* 7.4. For all other Object pairs, including Array objects, equivalence is
|
||||
* determined by having the same number of owned properties (as verified
|
||||
* with Object.prototype.hasOwnProperty.call), the same set of keys
|
||||
* (although not necessarily the same order), equivalent values for every
|
||||
* corresponding key, and an identical 'prototype' property. Note: this
|
||||
* accounts for both named and indexed properties on Arrays.
|
||||
*/
|
||||
// eslint-disable-next-line no-use-before-define
|
||||
return objEquiv(actual, expected, opts);
|
||||
}
|
||||
|
||||
function isUndefinedOrNull(value) {
|
||||
return value === null || value === undefined;
|
||||
}
|
||||
|
||||
function isBuffer(x) {
|
||||
if (!x || typeof x !== 'object' || typeof x.length !== 'number') {
|
||||
return false;
|
||||
}
|
||||
if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
|
||||
return false;
|
||||
}
|
||||
if (x.length > 0 && typeof x[0] !== 'number') {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function objEquiv(a, b, opts) {
|
||||
/* eslint max-statements: [2, 50] */
|
||||
var i, key;
|
||||
if (typeof a !== typeof b) { return false; }
|
||||
if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) { return false; }
|
||||
|
||||
// an identical 'prototype' property.
|
||||
if (a.prototype !== b.prototype) { return false; }
|
||||
|
||||
if (isArguments(a) !== isArguments(b)) { return false; }
|
||||
|
||||
var aIsRegex = isRegex(a);
|
||||
var bIsRegex = isRegex(b);
|
||||
if (aIsRegex !== bIsRegex) { return false; }
|
||||
if (aIsRegex || bIsRegex) {
|
||||
return a.source === b.source && flags(a) === flags(b);
|
||||
}
|
||||
|
||||
if (isDate(a) && isDate(b)) {
|
||||
return getTime.call(a) === getTime.call(b);
|
||||
}
|
||||
|
||||
var aIsBuffer = isBuffer(a);
|
||||
var bIsBuffer = isBuffer(b);
|
||||
if (aIsBuffer !== bIsBuffer) { return false; }
|
||||
if (aIsBuffer || bIsBuffer) { // && would work too, because both are true or both false here
|
||||
if (a.length !== b.length) { return false; }
|
||||
for (i = 0; i < a.length; i++) {
|
||||
if (a[i] !== b[i]) { return false; }
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (typeof a !== typeof b) { return false; }
|
||||
|
||||
try {
|
||||
var ka = objectKeys(a);
|
||||
var kb = objectKeys(b);
|
||||
} catch (e) { // happens when one is a string literal and the other isn't
|
||||
return false;
|
||||
}
|
||||
// having the same number of owned properties (keys incorporates hasOwnProperty)
|
||||
if (ka.length !== kb.length) { return false; }
|
||||
|
||||
// the same set of keys (although not necessarily the same order),
|
||||
ka.sort();
|
||||
kb.sort();
|
||||
// ~~~cheap key test
|
||||
for (i = ka.length - 1; i >= 0; i--) {
|
||||
if (ka[i] != kb[i]) { return false; }
|
||||
}
|
||||
// equivalent values for every corresponding key, and ~~~possibly expensive deep test
|
||||
for (i = ka.length - 1; i >= 0; i--) {
|
||||
key = ka[i];
|
||||
if (!deepEqual(a[key], b[key], opts)) { return false; }
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
module.exports = deepEqual;
|
||||
1
hGameTest/node_modules/deep-equal/lib/is_arguments.js
generated
vendored
Normal file
1
hGameTest/node_modules/deep-equal/lib/is_arguments.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('is-arguments');
|
||||
1
hGameTest/node_modules/deep-equal/lib/keys.js
generated
vendored
Normal file
1
hGameTest/node_modules/deep-equal/lib/keys.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('object-keys');
|
||||
116
hGameTest/node_modules/deep-equal/package.json
generated
vendored
Normal file
116
hGameTest/node_modules/deep-equal/package.json
generated
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
{
|
||||
"_from": "deep-equal@^1.0.1",
|
||||
"_id": "deep-equal@1.1.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==",
|
||||
"_location": "/deep-equal",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "deep-equal@^1.0.1",
|
||||
"name": "deep-equal",
|
||||
"escapedName": "deep-equal",
|
||||
"rawSpec": "^1.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^1.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/bonjour"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz",
|
||||
"_shasum": "b5c98c942ceffaf7cb051e24e1434a25a2e6076a",
|
||||
"_spec": "deep-equal@^1.0.1",
|
||||
"_where": "/home/andreas/Documents/Projects/haxe/openfl/nigger/node_modules/bonjour",
|
||||
"author": {
|
||||
"name": "James Halliday",
|
||||
"email": "mail@substack.net",
|
||||
"url": "http://substack.net"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/substack/node-deep-equal/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"is-arguments": "^1.0.4",
|
||||
"is-date-object": "^1.0.1",
|
||||
"is-regex": "^1.0.4",
|
||||
"object-is": "^1.0.1",
|
||||
"object-keys": "^1.1.1",
|
||||
"regexp.prototype.flags": "^1.2.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "node's assert.deepEqual algorithm",
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^15.0.1",
|
||||
"auto-changelog": "^1.16.2",
|
||||
"eslint": "^6.6.0",
|
||||
"safe-publish-latest": "^1.1.4",
|
||||
"tape": "^4.11.0"
|
||||
},
|
||||
"directories": {
|
||||
"lib": ".",
|
||||
"example": "example",
|
||||
"test": "test"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"homepage": "https://github.com/substack/node-deep-equal#readme",
|
||||
"keywords": [
|
||||
"equality",
|
||||
"equal",
|
||||
"compare"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "deep-equal",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/substack/node-deep-equal.git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"posttest": "npx aud",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
|
||||
"prepublish": "safe-publish-latest",
|
||||
"pretest": "npm run lint",
|
||||
"test": "npm run tests-only",
|
||||
"tests-only": "tape test/*",
|
||||
"version": "auto-changelog && git add CHANGELOG.md"
|
||||
},
|
||||
"testling": {
|
||||
"files": "test/*.js",
|
||||
"browsers": {
|
||||
"ie": [
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9
|
||||
],
|
||||
"ff": [
|
||||
3.5,
|
||||
10,
|
||||
15
|
||||
],
|
||||
"chrome": [
|
||||
10,
|
||||
22
|
||||
],
|
||||
"safari": [
|
||||
5.1
|
||||
],
|
||||
"opera": [
|
||||
12
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": "1.1.1"
|
||||
}
|
||||
57
hGameTest/node_modules/deep-equal/readme.markdown
generated
vendored
Normal file
57
hGameTest/node_modules/deep-equal/readme.markdown
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
# deep-equal
|
||||
|
||||
Node's `assert.deepEqual() algorithm` as a standalone module.
|
||||
|
||||
This module is around [5 times faster](https://gist.github.com/2790507)
|
||||
than wrapping `assert.deepEqual()` in a `try/catch`.
|
||||
|
||||
[](https://ci.testling.com/substack/node-deep-equal)
|
||||
|
||||
[](https://travis-ci.org/substack/node-deep-equal)
|
||||
|
||||
# example
|
||||
|
||||
``` js
|
||||
var equal = require('deep-equal');
|
||||
console.dir([
|
||||
equal(
|
||||
{ a : [ 2, 3 ], b : [ 4 ] },
|
||||
{ a : [ 2, 3 ], b : [ 4 ] }
|
||||
),
|
||||
equal(
|
||||
{ x : 5, y : [6] },
|
||||
{ x : 5, y : 6 }
|
||||
)
|
||||
]);
|
||||
```
|
||||
|
||||
# methods
|
||||
|
||||
``` js
|
||||
var deepEqual = require('deep-equal')
|
||||
```
|
||||
|
||||
## deepEqual(a, b, opts)
|
||||
|
||||
Compare objects `a` and `b`, returning whether they are equal according to a
|
||||
recursive equality algorithm.
|
||||
|
||||
If `opts.strict` is `true`, use strict equality (`===`) to compare leaf nodes.
|
||||
The default is to use coercive equality (`==`) because that's how
|
||||
`assert.deepEqual()` works by default.
|
||||
|
||||
# install
|
||||
|
||||
With [npm](http://npmjs.org) do:
|
||||
|
||||
```
|
||||
npm install deep-equal
|
||||
```
|
||||
|
||||
# test
|
||||
|
||||
With [npm](http://npmjs.org) do:
|
||||
|
||||
```
|
||||
npm test
|
||||
```
|
||||
21
hGameTest/node_modules/deep-equal/test/_tape.js
generated
vendored
Normal file
21
hGameTest/node_modules/deep-equal/test/_tape.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
var Test = require('tape/lib/test');
|
||||
var is = require('object-is');
|
||||
var equal = require('../');
|
||||
|
||||
function equalReversed(t, a, b, isEqual, msg, isStrict, skipReversed) {
|
||||
var actual = isStrict ? equal(a, b, { strict: true }) : equal(a, b);
|
||||
var suffix = isEqual ? ' are equal' : ' are not equal';
|
||||
t.equal(actual, !!isEqual, msg + suffix);
|
||||
if (typeof skipReversed === 'boolean' ? !skipReversed : !is(a, b)) {
|
||||
var actualReverse = isStrict ? equal(b, a, { strict: true }) : equal(b, a);
|
||||
t.equal(actualReverse, !!isEqual, msg + suffix + ' (reversed)');
|
||||
}
|
||||
}
|
||||
function deepEqualTest(t, a, b, msg, isEqual, isStrictEqual, skipReversed) {
|
||||
equalReversed(t, a, b, isEqual, msg, false, skipReversed);
|
||||
equalReversed(t, a, b, isStrictEqual, 'strict: ' + msg, true, skipReversed);
|
||||
}
|
||||
|
||||
Test.prototype.deepEqualTest = function (a, b, message, isEqual, isStrictEqual, skipReversed) {
|
||||
return deepEqualTest(this, a, b, message, !!isEqual, !!isStrictEqual, skipReversed);
|
||||
};
|
||||
344
hGameTest/node_modules/deep-equal/test/cmp.js
generated
vendored
Normal file
344
hGameTest/node_modules/deep-equal/test/cmp.js
generated
vendored
Normal file
@@ -0,0 +1,344 @@
|
||||
var test = require('tape');
|
||||
require('./_tape');
|
||||
|
||||
var equal = require('../');
|
||||
|
||||
test('equal', function (t) {
|
||||
t.deepEqualTest(
|
||||
{ a: [2, 3], b: [4] },
|
||||
{ a: [2, 3], b: [4] },
|
||||
'two equal objects',
|
||||
true,
|
||||
true,
|
||||
false
|
||||
);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('not equal', function (t) {
|
||||
t.deepEqualTest(
|
||||
{ x: 5, y: [6] },
|
||||
{ x: 5, y: 6 },
|
||||
'two inequal objects are',
|
||||
false,
|
||||
false
|
||||
);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('nested nulls', function (t) {
|
||||
t.deepEqualTest(
|
||||
[null, null, null],
|
||||
[null, null, null],
|
||||
'same-length arrays of nulls',
|
||||
true,
|
||||
true,
|
||||
true
|
||||
);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('objects with strings vs numbers', function (t) {
|
||||
t.deepEqualTest(
|
||||
[{ a: 3 }, { b: 4 }],
|
||||
[{ a: '3' }, { b: '4' }],
|
||||
'objects with equivalent string/number values',
|
||||
true,
|
||||
false
|
||||
);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('non-objects', function (t) {
|
||||
t.deepEqualTest(3, 3, 'same numbers', true, true, true);
|
||||
t.deepEqualTest('beep', 'beep', 'same strings', true, true, true);
|
||||
t.deepEqualTest('3', 3, 'numeric string and number', true, false);
|
||||
t.deepEqualTest('3', [3], 'numeric string and array containing number', false, false);
|
||||
t.deepEqualTest(3, [3], 'number and array containing number', false, false);
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('infinities', function (t) {
|
||||
t.deepEqualTest(Infinity, Infinity, '∞ and ∞', true, true, true);
|
||||
t.deepEqualTest(-Infinity, -Infinity, '-∞ and -∞', true, true, true);
|
||||
t.deepEqualTest(Infinity, -Infinity, '∞ and -∞', false, false);
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('arguments class', function (t) {
|
||||
function getArgs() {
|
||||
return arguments;
|
||||
}
|
||||
t.ok(
|
||||
equal(getArgs(1, 2, 3), getArgs(1, 2, 3)),
|
||||
'equivalent arguments objects are equal'
|
||||
);
|
||||
|
||||
t.deepEqualTest(
|
||||
getArgs(1, 2, 3),
|
||||
[1, 2, 3],
|
||||
'array and arguments with same contents',
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('dates', function (t) {
|
||||
var d0 = new Date(1387585278000);
|
||||
var d1 = new Date('Fri Dec 20 2013 16:21:18 GMT-0800 (PST)');
|
||||
t.deepEqualTest(d0, d1, 'equivalent Dates', true, true);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('buffers', function (t) {
|
||||
/* eslint no-buffer-constructor: 1, new-cap: 1 */
|
||||
t.ok(equal(Buffer('xyz'), Buffer('xyz')), 'buffers with same contents are equal');
|
||||
t.ok(equal(Buffer('xyz'), Buffer('xyz'), { strict: true }), 'strict: buffers with same contents are equal');
|
||||
|
||||
t.deepEqualTest(
|
||||
Buffer('abc'),
|
||||
Buffer('xyz'),
|
||||
'buffers with different contents',
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
||||
t.deepEqualTest(
|
||||
Buffer(''),
|
||||
[],
|
||||
'empty buffer and empty array',
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('booleans and arrays', function (t) {
|
||||
t.deepEqualTest(
|
||||
true,
|
||||
[],
|
||||
'true and an empty array',
|
||||
false,
|
||||
false
|
||||
);
|
||||
t.deepEqualTest(
|
||||
false,
|
||||
[],
|
||||
'false and an empty array',
|
||||
true,
|
||||
false
|
||||
);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('arrays initiated', function (t) {
|
||||
var a0 = [
|
||||
undefined,
|
||||
null,
|
||||
-1,
|
||||
0,
|
||||
1,
|
||||
false,
|
||||
true,
|
||||
undefined,
|
||||
'',
|
||||
'abc',
|
||||
null,
|
||||
undefined
|
||||
],
|
||||
a1 = [
|
||||
undefined,
|
||||
null,
|
||||
-1,
|
||||
0,
|
||||
1,
|
||||
false,
|
||||
true,
|
||||
undefined,
|
||||
'',
|
||||
'abc',
|
||||
null,
|
||||
undefined
|
||||
];
|
||||
|
||||
t.ok(equal(a0, a1));
|
||||
t.end();
|
||||
});
|
||||
|
||||
// eslint-disable-next-line max-statements
|
||||
test('arrays assigned', function (t) {
|
||||
var a0 = [
|
||||
undefined,
|
||||
null,
|
||||
-1,
|
||||
0,
|
||||
1,
|
||||
false,
|
||||
true,
|
||||
undefined,
|
||||
'',
|
||||
'abc',
|
||||
null,
|
||||
undefined
|
||||
];
|
||||
var a1 = [];
|
||||
|
||||
a1[0] = undefined;
|
||||
a1[1] = null;
|
||||
a1[2] = -1;
|
||||
a1[3] = 0;
|
||||
a1[4] = 1;
|
||||
a1[5] = false;
|
||||
a1[6] = true;
|
||||
a1[7] = undefined;
|
||||
a1[8] = '';
|
||||
a1[9] = 'abc';
|
||||
a1[10] = null;
|
||||
a1[11] = undefined;
|
||||
a1.length = 12;
|
||||
|
||||
t.deepEqualTest(a0, a1, 'a literal array and an assigned array', true, true);
|
||||
t.end();
|
||||
});
|
||||
|
||||
// eslint-disable-next-line max-statements
|
||||
test('arrays push', function (t) {
|
||||
var a0 = [
|
||||
undefined,
|
||||
null,
|
||||
-1,
|
||||
0,
|
||||
1,
|
||||
false,
|
||||
true,
|
||||
undefined,
|
||||
'',
|
||||
'abc',
|
||||
null,
|
||||
undefined
|
||||
],
|
||||
a1 = [];
|
||||
|
||||
a1.push(undefined);
|
||||
a1.push(null);
|
||||
a1.push(-1);
|
||||
a1.push(0);
|
||||
a1.push(1);
|
||||
a1.push(false);
|
||||
a1.push(true);
|
||||
a1.push(undefined);
|
||||
a1.push('');
|
||||
a1.push('abc');
|
||||
a1.push(null);
|
||||
a1.push(undefined);
|
||||
a1.length = 12;
|
||||
|
||||
t.deepEqualTest(a0, a1, 'a literal array and a pushed array', true, true);
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('null == undefined', function (t) {
|
||||
t.deepEqualTest(null, undefined, 'null and undefined', true, false);
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('NaNs', function (t) {
|
||||
t.notOk(equal(NaN, NaN), 'NaN is not NaN');
|
||||
t.ok(equal(NaN, NaN, { strict: true }), 'strict: NaN is NaN');
|
||||
|
||||
t.notOk(equal({ a: NaN }, { a: NaN }), 'two equiv objects with a NaN value are not equiv');
|
||||
t.ok(equal({ a: NaN }, { a: NaN }, { strict: true }), 'strict: two equiv objects with a NaN value are equiv');
|
||||
|
||||
t.notOk(equal(NaN, 1), 'NaN !== 1');
|
||||
t.notOk(equal(NaN, 1, { strict: true }), 'strict: NaN !== 1');
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('zeroes', function (t) {
|
||||
t.deepEqualTest(0, -0, '0 and -0', true, false);
|
||||
|
||||
t.deepEqualTest({ a: 0 }, { a: -0 }, 'two objects with a same-keyed 0/-0 value', true, false);
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Object.create', { skip: !Object.create }, function (t) {
|
||||
var a = { a: 'A' };
|
||||
var b = Object.create(a);
|
||||
b.b = 'B';
|
||||
var c = Object.create(a);
|
||||
c.b = 'C';
|
||||
|
||||
t.deepEqualTest(
|
||||
b,
|
||||
c,
|
||||
'two objects with the same [[Prototype]] but a different own property',
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Object.create(null)', { skip: !Object.create }, function (t) {
|
||||
t.deepEqualTest(
|
||||
Object.create(null),
|
||||
Object.create(null),
|
||||
'two empty null objects',
|
||||
true,
|
||||
true,
|
||||
true
|
||||
);
|
||||
|
||||
t.deepEqualTest(
|
||||
Object.create(null, { a: { value: 'b' } }),
|
||||
Object.create(null, { a: { value: 'b' } }),
|
||||
'two null objects with the same property pair',
|
||||
true,
|
||||
true,
|
||||
true
|
||||
);
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('regexes vs dates', function (t) {
|
||||
var d = new Date(1387585278000);
|
||||
var r = /abc/;
|
||||
|
||||
t.deepEqualTest(d, r, 'Date and RegExp', false, false);
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('regexen', function (t) {
|
||||
t.deepEqualTest(/abc/, /xyz/, 'two different regexes', false, false);
|
||||
t.deepEqualTest(/abc/, /abc/, 'two abc regexes', true, true, false);
|
||||
t.deepEqualTest(/xyz/, /xyz/, 'two xyz regexes', true, true, false);
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('arrays and objects', function (t) {
|
||||
t.deepEqualTest([], {}, 'empty array and empty object', true, true);
|
||||
t.deepEqualTest([], { length: 0 }, 'empty array and empty arraylike object', false, false);
|
||||
t.deepEqualTest([1], { 0: 1 }, 'array and similar object', true, true);
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('functions', function (t) {
|
||||
function f() {}
|
||||
|
||||
t.deepEqualTest(f, f, 'a function and itself', true, true, true);
|
||||
t.deepEqualTest(function () {}, function () {}, 'two distinct functions', false, false, true);
|
||||
|
||||
t.end();
|
||||
});
|
||||
Reference in New Issue
Block a user