step-node-agent 3.29.1 → 3.29.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/har-validator/node_modules/ajv/README.md +14 -6
- package/node_modules/har-validator/node_modules/ajv/dist/ajv.bundle.js +23 -11
- package/node_modules/har-validator/node_modules/ajv/dist/ajv.min.js +2 -2
- package/node_modules/har-validator/node_modules/ajv/dist/ajv.min.js.map +1 -1
- package/node_modules/har-validator/node_modules/ajv/lib/ajv.d.ts +5 -0
- package/node_modules/har-validator/node_modules/ajv/lib/compile/index.js +8 -6
- package/node_modules/har-validator/node_modules/ajv/lib/dot/pattern.jst +15 -4
- package/node_modules/har-validator/node_modules/ajv/lib/dotjs/pattern.js +14 -4
- package/node_modules/har-validator/node_modules/ajv/package.json +2 -1
- package/node_modules/har-validator/node_modules/ajv/scripts/info +0 -0
- package/node_modules/har-validator/node_modules/ajv/scripts/prepare-tests +0 -0
- package/node_modules/har-validator/node_modules/ajv/scripts/publish-built-version +0 -0
- package/node_modules/har-validator/node_modules/ajv/scripts/travis-gh-pages +0 -0
- package/node_modules/minimatch/README.md +37 -0
- package/node_modules/minimatch/minimatch.js +160 -102
- package/node_modules/minimatch/package.json +2 -2
- package/node_modules/qs/.editorconfig +1 -1
- package/node_modules/qs/.github/SECURITY.md +11 -0
- package/node_modules/qs/.github/THREAT_MODEL.md +78 -0
- package/node_modules/qs/CHANGELOG.md +22 -0
- package/node_modules/qs/README.md +11 -4
- package/node_modules/qs/dist/qs.js +24 -24
- package/node_modules/qs/eslint.config.mjs +56 -0
- package/node_modules/qs/lib/parse.js +90 -47
- package/node_modules/qs/lib/utils.js +83 -11
- package/node_modules/qs/package.json +9 -8
- package/node_modules/qs/test/parse.js +245 -9
- package/node_modules/qs/test/stringify.js +7 -3
- package/node_modules/qs/test/utils.js +135 -0
- package/node_modules/request/node_modules/qs/CHANGELOG.md +12 -0
- package/node_modules/request/node_modules/qs/README.md +9 -3
- package/node_modules/request/node_modules/qs/dist/qs.js +10 -10
- package/node_modules/request/node_modules/qs/lib/parse.js +4 -4
- package/node_modules/request/node_modules/qs/lib/utils.js +6 -6
- package/node_modules/request/node_modules/qs/package.json +13 -4
- package/node_modules/request/node_modules/qs/test/parse.js +9 -0
- package/node_modules/request/node_modules/qs/test/stringify.js +6 -0
- package/node_modules/send/HISTORY.md +7 -0
- package/node_modules/send/package.json +5 -5
- package/node_modules/serve-static/HISTORY.md +6 -0
- package/node_modules/serve-static/package.json +2 -2
- package/node_modules/underscore/amd/_setup.js +1 -1
- package/node_modules/underscore/amd/pipe.js +13 -0
- package/node_modules/underscore/cjs/_setup.js +1 -1
- package/node_modules/underscore/cjs/pipe.js +12 -0
- package/node_modules/underscore/modules/_flatten.js +20 -18
- package/node_modules/underscore/modules/_setup.js +1 -1
- package/node_modules/underscore/modules/index.js +2 -2
- package/node_modules/underscore/modules/isEqual.js +108 -93
- package/node_modules/underscore/modules/package.json +1 -1
- package/node_modules/underscore/package.json +1 -1
- package/node_modules/underscore/underscore-esm-min.js +3 -3
- package/node_modules/underscore/underscore-esm-min.js.map +1 -1
- package/node_modules/underscore/underscore-esm.js +132 -115
- package/node_modules/underscore/underscore-esm.js.map +1 -1
- package/node_modules/underscore/underscore-min.js +3 -3
- package/node_modules/underscore/underscore-min.js.map +1 -1
- package/node_modules/underscore/underscore-node-f.cjs +132 -115
- package/node_modules/underscore/underscore-node-f.cjs.map +1 -1
- package/node_modules/underscore/underscore-node.cjs +2 -2
- package/node_modules/underscore/underscore-node.mjs +2 -2
- package/node_modules/underscore/underscore-umd-min.js +3 -3
- package/node_modules/underscore/underscore-umd-min.js.map +1 -1
- package/node_modules/underscore/underscore-umd.js +132 -115
- package/node_modules/underscore/underscore-umd.js.map +1 -1
- package/node_modules/underscore/underscore.js +132 -115
- package/package.json +1 -1
- package/node_modules/qs/.eslintrc +0 -39
- package/node_modules/request/node_modules/qs/bower.json +0 -21
- package/node_modules/request/node_modules/qs/component.json +0 -15
- package/node_modules/send/node_modules/http-errors/HISTORY.md +0 -180
- package/node_modules/send/node_modules/http-errors/LICENSE +0 -23
- package/node_modules/send/node_modules/http-errors/README.md +0 -169
- package/node_modules/send/node_modules/http-errors/index.js +0 -289
- package/node_modules/send/node_modules/http-errors/package.json +0 -50
- package/node_modules/send/node_modules/statuses/HISTORY.md +0 -82
- package/node_modules/send/node_modules/statuses/LICENSE +0 -23
- package/node_modules/send/node_modules/statuses/README.md +0 -136
- package/node_modules/send/node_modules/statuses/codes.json +0 -65
- package/node_modules/send/node_modules/statuses/index.js +0 -146
- package/node_modules/send/node_modules/statuses/package.json +0 -49
- package/node_modules/serve-static/node_modules/http-errors/HISTORY.md +0 -180
- package/node_modules/serve-static/node_modules/http-errors/LICENSE +0 -23
- package/node_modules/serve-static/node_modules/http-errors/README.md +0 -169
- package/node_modules/serve-static/node_modules/http-errors/index.js +0 -289
- package/node_modules/serve-static/node_modules/http-errors/package.json +0 -50
- package/node_modules/serve-static/node_modules/ms/index.js +0 -162
- package/node_modules/serve-static/node_modules/ms/license.md +0 -21
- package/node_modules/serve-static/node_modules/ms/package.json +0 -38
- package/node_modules/serve-static/node_modules/ms/readme.md +0 -59
- package/node_modules/serve-static/node_modules/send/HISTORY.md +0 -526
- package/node_modules/serve-static/node_modules/send/LICENSE +0 -23
- package/node_modules/serve-static/node_modules/send/README.md +0 -327
- package/node_modules/serve-static/node_modules/send/SECURITY.md +0 -24
- package/node_modules/serve-static/node_modules/send/index.js +0 -1142
- package/node_modules/serve-static/node_modules/send/node_modules/encodeurl/HISTORY.md +0 -14
- package/node_modules/serve-static/node_modules/send/node_modules/encodeurl/LICENSE +0 -22
- package/node_modules/serve-static/node_modules/send/node_modules/encodeurl/README.md +0 -128
- package/node_modules/serve-static/node_modules/send/node_modules/encodeurl/index.js +0 -60
- package/node_modules/serve-static/node_modules/send/node_modules/encodeurl/package.json +0 -40
- package/node_modules/serve-static/node_modules/send/package.json +0 -62
- package/node_modules/serve-static/node_modules/statuses/HISTORY.md +0 -82
- package/node_modules/serve-static/node_modules/statuses/LICENSE +0 -23
- package/node_modules/serve-static/node_modules/statuses/README.md +0 -136
- package/node_modules/serve-static/node_modules/statuses/codes.json +0 -65
- package/node_modules/serve-static/node_modules/statuses/index.js +0 -146
- package/node_modules/serve-static/node_modules/statuses/package.json +0 -49
- package/node_modules/underscore/amd/_set.js +0 -21
- package/node_modules/underscore/amd/set.js +0 -15
- package/node_modules/underscore/cjs/_set.js +0 -21
- package/node_modules/underscore/cjs/set.js +0 -15
|
@@ -5,7 +5,7 @@ var has = Object.prototype.hasOwnProperty;
|
|
|
5
5
|
var hexTable = (function () {
|
|
6
6
|
var array = [];
|
|
7
7
|
for (var i = 0; i < 256; ++i) {
|
|
8
|
-
array.
|
|
8
|
+
array[array.length] = '%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase();
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
return array;
|
|
@@ -23,7 +23,7 @@ var compactQueue = function compactQueue(queue) {
|
|
|
23
23
|
|
|
24
24
|
for (var j = 0; j < obj.length; ++j) {
|
|
25
25
|
if (typeof obj[j] !== 'undefined') {
|
|
26
|
-
compacted.
|
|
26
|
+
compacted[compacted.length] = obj[j];
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -52,7 +52,7 @@ var merge = function merge(target, source, options) {
|
|
|
52
52
|
|
|
53
53
|
if (typeof source !== 'object') {
|
|
54
54
|
if (Array.isArray(target)) {
|
|
55
|
-
target.
|
|
55
|
+
target[target.length] = source;
|
|
56
56
|
} else if (target && typeof target === 'object') {
|
|
57
57
|
if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
|
|
58
58
|
target[source] = true;
|
|
@@ -80,7 +80,7 @@ var merge = function merge(target, source, options) {
|
|
|
80
80
|
if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
|
|
81
81
|
target[i] = merge(targetItem, item, options);
|
|
82
82
|
} else {
|
|
83
|
-
target.
|
|
83
|
+
target[target.length] = item;
|
|
84
84
|
}
|
|
85
85
|
} else {
|
|
86
86
|
target[i] = item;
|
|
@@ -182,8 +182,8 @@ var compact = function compact(value) {
|
|
|
182
182
|
var key = keys[j];
|
|
183
183
|
var val = obj[key];
|
|
184
184
|
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
|
|
185
|
-
queue.
|
|
186
|
-
refs.
|
|
185
|
+
queue[queue.length] = { obj: obj, prop: key };
|
|
186
|
+
refs[refs.length] = val;
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "qs",
|
|
3
3
|
"description": "A querystring parser that supports nesting and arrays, with a depth limit",
|
|
4
4
|
"homepage": "https://github.com/ljharb/qs",
|
|
5
|
-
"version": "6.5.
|
|
5
|
+
"version": "6.5.5",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/ljharb/qs.git"
|
|
@@ -36,10 +36,11 @@
|
|
|
36
36
|
"qs-iconv": "^1.0.4",
|
|
37
37
|
"safe-publish-latest": "^2.0.0",
|
|
38
38
|
"safer-buffer": "^2.1.2",
|
|
39
|
-
"tape": "^5.4.0"
|
|
39
|
+
"tape": "^5.4.0",
|
|
40
|
+
"npmignore": "^0.3.1"
|
|
40
41
|
},
|
|
41
42
|
"scripts": {
|
|
42
|
-
"prepublishOnly": "safe-publish-latest && npm run dist",
|
|
43
|
+
"prepublishOnly": "safe-publish-latest && npmignore --auto --commentLines=autogenerated && npm run dist",
|
|
43
44
|
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
44
45
|
"pretest": "npm run --silent readme && npm run --silent lint",
|
|
45
46
|
"test": "npm run --silent tests-only",
|
|
@@ -50,5 +51,13 @@
|
|
|
50
51
|
"lint": "eslint --ext=js,mjs .",
|
|
51
52
|
"dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js"
|
|
52
53
|
},
|
|
53
|
-
"license": "BSD-3-Clause"
|
|
54
|
+
"license": "BSD-3-Clause",
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"ignore": [
|
|
57
|
+
"!dist/*",
|
|
58
|
+
"bower.json",
|
|
59
|
+
"component.json",
|
|
60
|
+
".github/workflows"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
54
63
|
}
|
|
@@ -52,6 +52,15 @@ test('parse()', function (t) {
|
|
|
52
52
|
st.end();
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
+
t.test('correctly computes the remainder when depth is exceeded', function (st) {
|
|
56
|
+
st.deepEqual(
|
|
57
|
+
qs.parse('a[b][c][d][e]=f', { depth: 2 }),
|
|
58
|
+
{ a: { b: { c: { '[d][e]': 'f' } } } },
|
|
59
|
+
'the remainder is "[d][e]", not the full original key'
|
|
60
|
+
);
|
|
61
|
+
st.end();
|
|
62
|
+
});
|
|
63
|
+
|
|
55
64
|
t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array');
|
|
56
65
|
|
|
57
66
|
t.test('parses an explicit array', function (st) {
|
|
@@ -19,6 +19,12 @@ test('stringify()', function (t) {
|
|
|
19
19
|
st.end();
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
+
t.test('correctly encodes low-byte characters', function (st) {
|
|
23
|
+
st.equal(qs.stringify({ a: String.fromCharCode(1) }), 'a=%01', 'encodes 0x01');
|
|
24
|
+
st.equal(qs.stringify({ a: String.fromCharCode(15) }), 'a=%0F', 'encodes 0x0F');
|
|
25
|
+
st.end();
|
|
26
|
+
});
|
|
27
|
+
|
|
22
28
|
t.test('stringifies falsy values', function (st) {
|
|
23
29
|
st.equal(qs.stringify(undefined), '');
|
|
24
30
|
st.equal(qs.stringify(null), '');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "send",
|
|
3
3
|
"description": "Better streaming static file server with Range and conditional-GET support",
|
|
4
|
-
"version": "0.19.
|
|
4
|
+
"version": "0.19.2",
|
|
5
5
|
"author": "TJ Holowaychuk <tj@vision-media.ca>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"encodeurl": "~2.0.0",
|
|
23
23
|
"escape-html": "~1.0.3",
|
|
24
24
|
"etag": "~1.8.1",
|
|
25
|
-
"fresh": "0.5.2",
|
|
26
|
-
"http-errors": "2.0.
|
|
25
|
+
"fresh": "~0.5.2",
|
|
26
|
+
"http-errors": "~2.0.1",
|
|
27
27
|
"mime": "1.6.0",
|
|
28
28
|
"ms": "2.1.3",
|
|
29
|
-
"on-finished": "2.4.1",
|
|
29
|
+
"on-finished": "~2.4.1",
|
|
30
30
|
"range-parser": "~1.2.1",
|
|
31
|
-
"statuses": "2.0.
|
|
31
|
+
"statuses": "~2.0.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"after": "0.8.2",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "serve-static",
|
|
3
3
|
"description": "Serve static files",
|
|
4
|
-
"version": "1.16.
|
|
4
|
+
"version": "1.16.3",
|
|
5
5
|
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "expressjs/serve-static",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"encodeurl": "~2.0.0",
|
|
10
10
|
"escape-html": "~1.0.3",
|
|
11
11
|
"parseurl": "~1.3.3",
|
|
12
|
-
"send": "0.19.
|
|
12
|
+
"send": "~0.19.1"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"eslint": "7.32.0",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
define(['./restArguments', './reduce'], function (restArguments, reduce) {
|
|
2
|
+
|
|
3
|
+
function nextValue(previous, func) {
|
|
4
|
+
return func(previous);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
var pipe = restArguments(function(value, funcs) {
|
|
8
|
+
return reduce(funcs, nextValue, value);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
return pipe;
|
|
12
|
+
|
|
13
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
|
|
3
3
|
// Current version.
|
|
4
|
-
var VERSION = '1.13.
|
|
4
|
+
var VERSION = '1.13.8';
|
|
5
5
|
|
|
6
6
|
// Establish the root object, `window` (`self`) in the browser, `global`
|
|
7
7
|
// on the server, or `this` in some virtual machines. We use `self`
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var restArguments = require('./restArguments.js');
|
|
2
|
+
var reduce = require('./reduce.js');
|
|
3
|
+
|
|
4
|
+
function nextValue(previous, func) {
|
|
5
|
+
return func(previous);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
var pipe = restArguments(function(value, funcs) {
|
|
9
|
+
return reduce(funcs, nextValue, value);
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
module.exports = pipe;
|
|
@@ -4,25 +4,27 @@ import isArray from './isArray.js';
|
|
|
4
4
|
import isArguments from './isArguments.js';
|
|
5
5
|
|
|
6
6
|
// Internal implementation of a recursive `flatten` function.
|
|
7
|
-
export default function flatten(input, depth, strict
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
export default function flatten(input, depth, strict) {
|
|
8
|
+
if (!depth && depth !== 0) depth = Infinity;
|
|
9
|
+
var output = [], idx = 0, i = 0, length = getLength(input) || 0, stack = [];
|
|
10
|
+
while (true) {
|
|
11
|
+
if (i >= length) {
|
|
12
|
+
if (!stack.length) break;
|
|
13
|
+
var frame = stack.pop();
|
|
14
|
+
i = frame.i;
|
|
15
|
+
input = frame.v;
|
|
16
|
+
length = getLength(input);
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
var value = input[i++];
|
|
20
|
+
if (stack.length >= depth) {
|
|
21
|
+
output[idx++] = value;
|
|
22
|
+
} else if (isArrayLike(value) && (isArray(value) || isArguments(value))) {
|
|
18
23
|
// Flatten current level of array or arguments object.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var j = 0, len = value.length;
|
|
24
|
-
while (j < len) output[idx++] = value[j++];
|
|
25
|
-
}
|
|
24
|
+
stack.push({i: i, v: input});
|
|
25
|
+
i = 0;
|
|
26
|
+
input = value;
|
|
27
|
+
length = getLength(input);
|
|
26
28
|
} else if (!strict) {
|
|
27
29
|
output[idx++] = value;
|
|
28
30
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// Named Exports
|
|
2
2
|
// =============
|
|
3
3
|
|
|
4
|
-
// Underscore.js 1.13.
|
|
4
|
+
// Underscore.js 1.13.8
|
|
5
5
|
// https://underscorejs.org
|
|
6
|
-
// (c) 2009-
|
|
6
|
+
// (c) 2009-2026 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
|
|
7
7
|
// Underscore may be freely distributed under the MIT license.
|
|
8
8
|
|
|
9
9
|
// Baseline setup.
|
|
@@ -12,127 +12,142 @@ import toBufferView from './_toBufferView.js';
|
|
|
12
12
|
// We use this string twice, so give it a name for minification.
|
|
13
13
|
var tagDataView = '[object DataView]';
|
|
14
14
|
|
|
15
|
-
//
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
15
|
+
// Perform a deep comparison to check if two objects are equal.
|
|
16
|
+
export default function isEqual(a, b) {
|
|
17
|
+
var todo = [{a: a, b: b}];
|
|
18
|
+
// Initializing stacks of traversed objects for cycle detection.
|
|
19
|
+
var aStack = [], bStack = [];
|
|
20
|
+
|
|
21
|
+
while (todo.length) {
|
|
22
|
+
var frame = todo.pop();
|
|
23
|
+
if (frame === true) {
|
|
24
|
+
// Remove the first object from the stack of traversed objects.
|
|
25
|
+
aStack.pop();
|
|
26
|
+
bStack.pop();
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
a = frame.a;
|
|
30
|
+
b = frame.b;
|
|
31
|
+
|
|
32
|
+
// Identical objects are equal. `0 === -0`, but they aren't identical.
|
|
33
|
+
// See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).
|
|
34
|
+
if (a === b) {
|
|
35
|
+
if (a !== 0 || 1 / a === 1 / b) continue;
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
// `null` or `undefined` only equal to itself (strict comparison).
|
|
39
|
+
if (a == null || b == null) return false;
|
|
40
|
+
// `NaN`s are equivalent, but non-reflexive.
|
|
41
|
+
if (a !== a) {
|
|
42
|
+
if (b !== b) continue;
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
// Exhaust primitive checks
|
|
46
|
+
var type = typeof a;
|
|
47
|
+
if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
|
|
29
48
|
|
|
30
49
|
// Internal recursive comparison function for `_.isEqual`.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
// These types are compared by value.
|
|
50
|
+
// Unwrap any wrapped objects.
|
|
51
|
+
if (a instanceof _) a = a._wrapped;
|
|
52
|
+
if (b instanceof _) b = b._wrapped;
|
|
53
|
+
// Compare `[[Class]]` names.
|
|
54
|
+
var className = toString.call(a);
|
|
55
|
+
if (className !== toString.call(b)) return false;
|
|
56
|
+
// Work around a bug in IE 10 - Edge 13.
|
|
57
|
+
if (hasDataViewBug && className == '[object Object]' && isDataView(a)) {
|
|
58
|
+
if (!isDataView(b)) return false;
|
|
59
|
+
className = tagDataView;
|
|
60
|
+
}
|
|
61
|
+
switch (className) {
|
|
62
|
+
// These types are compared by value.
|
|
45
63
|
case '[object RegExp]':
|
|
46
64
|
// RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
|
|
47
65
|
case '[object String]':
|
|
48
66
|
// Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
|
|
49
67
|
// equivalent to `new String("5")`.
|
|
50
|
-
|
|
68
|
+
if ('' + a === '' + b) continue;
|
|
69
|
+
return false;
|
|
51
70
|
case '[object Number]':
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (+a !== +a) return +b !== +b;
|
|
55
|
-
// An `egal` comparison is performed for other numeric values.
|
|
56
|
-
return +a === 0 ? 1 / +a === 1 / b : +a === +b;
|
|
71
|
+
todo.push({a: +a, b: +b});
|
|
72
|
+
continue;
|
|
57
73
|
case '[object Date]':
|
|
58
74
|
case '[object Boolean]':
|
|
59
75
|
// Coerce dates and booleans to numeric primitive values. Dates are compared by their
|
|
60
76
|
// millisecond representations. Note that invalid dates with millisecond representations
|
|
61
77
|
// of `NaN` are not equivalent.
|
|
62
|
-
|
|
78
|
+
if (+a === +b) continue;
|
|
79
|
+
return false;
|
|
63
80
|
case '[object Symbol]':
|
|
64
|
-
|
|
81
|
+
if (SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b)) continue;
|
|
82
|
+
return false;
|
|
65
83
|
case '[object ArrayBuffer]':
|
|
66
84
|
case tagDataView:
|
|
67
85
|
// Coerce to typed array so we can fall through.
|
|
68
|
-
|
|
69
|
-
|
|
86
|
+
todo.push({a: toBufferView(a), b: toBufferView(b)});
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
70
89
|
|
|
71
|
-
|
|
72
|
-
|
|
90
|
+
var areArrays = className === '[object Array]';
|
|
91
|
+
if (!areArrays && isTypedArray(a)) {
|
|
73
92
|
var byteLength = getByteLength(a);
|
|
74
93
|
if (byteLength !== getByteLength(b)) return false;
|
|
75
|
-
if (a.buffer === b.buffer && a.byteOffset === b.byteOffset)
|
|
94
|
+
if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) continue;
|
|
76
95
|
areArrays = true;
|
|
77
|
-
}
|
|
78
|
-
if (!areArrays) {
|
|
79
|
-
if (typeof a != 'object' || typeof b != 'object') return false;
|
|
80
|
-
|
|
81
|
-
// Objects with different constructors are not equivalent, but `Object`s or `Array`s
|
|
82
|
-
// from different frames are.
|
|
83
|
-
var aCtor = a.constructor, bCtor = b.constructor;
|
|
84
|
-
if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor &&
|
|
85
|
-
isFunction(bCtor) && bCtor instanceof bCtor)
|
|
86
|
-
&& ('constructor' in a && 'constructor' in b)) {
|
|
87
|
-
return false;
|
|
88
96
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
// structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
|
|
97
|
+
if (!areArrays) {
|
|
98
|
+
if (typeof a != 'object' || typeof b != 'object') return false;
|
|
92
99
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
100
|
+
// Objects with different constructors are not equivalent, but `Object`s or `Array`s
|
|
101
|
+
// from different frames are.
|
|
102
|
+
var aCtor = a.constructor, bCtor = b.constructor;
|
|
103
|
+
if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor &&
|
|
104
|
+
isFunction(bCtor) && bCtor instanceof bCtor)
|
|
105
|
+
&& ('constructor' in a && 'constructor' in b)) {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
103
109
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
bStack.push(b);
|
|
110
|
+
// Assume equality for cyclic structures. The algorithm for detecting cyclic
|
|
111
|
+
// structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
|
|
107
112
|
|
|
108
|
-
|
|
109
|
-
if (areArrays) {
|
|
110
|
-
// Compare array lengths to determine if a deep comparison is necessary.
|
|
111
|
-
length = a.length;
|
|
112
|
-
if (length !== b.length) return false;
|
|
113
|
-
// Deep compare the contents, ignoring non-numeric properties.
|
|
113
|
+
var length = aStack.length;
|
|
114
114
|
while (length--) {
|
|
115
|
-
|
|
115
|
+
// Linear search. Performance is inversely proportional to the number of
|
|
116
|
+
// unique nested structures.
|
|
117
|
+
if (aStack[length] === a) {
|
|
118
|
+
if (bStack[length] === b) break;
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
116
121
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
if (length >= 0) continue;
|
|
123
|
+
|
|
124
|
+
// Add the first object to the stack of traversed objects.
|
|
125
|
+
aStack.push(a);
|
|
126
|
+
bStack.push(b);
|
|
127
|
+
todo.push(true);
|
|
128
|
+
|
|
129
|
+
// Recursively compare objects and arrays.
|
|
130
|
+
if (areArrays) {
|
|
131
|
+
// Compare array lengths to determine if a deep comparison is necessary.
|
|
132
|
+
length = a.length;
|
|
133
|
+
if (length !== b.length) return false;
|
|
134
|
+
// Deep compare the contents, ignoring non-numeric properties.
|
|
135
|
+
while (length--) {
|
|
136
|
+
todo.push({a: a[length], b: b[length]});
|
|
137
|
+
}
|
|
138
|
+
} else {
|
|
139
|
+
// Deep compare objects.
|
|
140
|
+
var _keys = keys(a), key;
|
|
141
|
+
length = _keys.length;
|
|
142
|
+
// Ensure that both objects contain the same number of properties before comparing deep equality.
|
|
143
|
+
if (keys(b).length !== length) return false;
|
|
144
|
+
while (length--) {
|
|
145
|
+
// Deep compare each member
|
|
146
|
+
key = _keys[length];
|
|
147
|
+
if (!has(b, key)) return false;
|
|
148
|
+
todo.push({a: a[key], b: b[key]});
|
|
149
|
+
}
|
|
127
150
|
}
|
|
128
151
|
}
|
|
129
|
-
// Remove the first object from the stack of traversed objects.
|
|
130
|
-
aStack.pop();
|
|
131
|
-
bStack.pop();
|
|
132
152
|
return true;
|
|
133
153
|
}
|
|
134
|
-
|
|
135
|
-
// Perform a deep comparison to check if two objects are equal.
|
|
136
|
-
export default function isEqual(a, b) {
|
|
137
|
-
return eq(a, b);
|
|
138
|
-
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"1.13.
|
|
1
|
+
{"type":"module","version":"1.13.8"}
|