core-js 3.45.1 → 3.47.0

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.
Files changed (57) hide show
  1. package/LICENSE +1 -1
  2. package/actual/iterator/concat.js +2 -18
  3. package/actual/iterator/index.js +3 -0
  4. package/actual/iterator/zip-keyed.js +24 -0
  5. package/actual/iterator/zip.js +22 -0
  6. package/actual/json/index.js +0 -3
  7. package/actual/json/is-raw-json.js +2 -2
  8. package/actual/json/parse.js +2 -3
  9. package/actual/json/raw-json.js +3 -4
  10. package/es/index.js +4 -0
  11. package/es/iterator/concat.js +21 -0
  12. package/es/iterator/index.js +1 -0
  13. package/es/json/index.js +6 -0
  14. package/es/json/is-raw-json.js +5 -0
  15. package/es/json/parse.js +6 -0
  16. package/es/json/raw-json.js +7 -0
  17. package/full/index.js +4 -0
  18. package/full/iterator/index.js +1 -3
  19. package/full/iterator/zip-keyed.js +2 -22
  20. package/full/iterator/zip.js +2 -20
  21. package/internals/check-correctness-of-iteration.js +2 -0
  22. package/internals/fix-regexp-well-known-symbol-logic.js +6 -4
  23. package/internals/internal-metadata.js +1 -0
  24. package/internals/iterator-window.js +11 -6
  25. package/internals/iterator-zip.js +1 -1
  26. package/internals/set-method-accept-set-like.js +1 -3
  27. package/internals/shared-store.js +3 -3
  28. package/internals/to-string-tag-support.js +1 -1
  29. package/modules/es.error.cause.js +2 -0
  30. package/modules/es.iterator.concat.js +56 -0
  31. package/modules/es.json.is-raw-json.js +11 -0
  32. package/modules/es.json.parse.js +251 -0
  33. package/modules/es.json.raw-json.js +39 -0
  34. package/modules/es.json.stringify.js +78 -19
  35. package/modules/es.object.group-by.js +2 -1
  36. package/modules/esnext.iterator.concat.js +2 -55
  37. package/modules/esnext.iterator.sliding.js +1 -1
  38. package/modules/esnext.iterator.windows.js +2 -2
  39. package/modules/esnext.iterator.zip-keyed.js +3 -2
  40. package/modules/esnext.iterator.zip.js +1 -1
  41. package/modules/esnext.json.is-raw-json.js +2 -10
  42. package/modules/esnext.json.parse.js +2 -250
  43. package/modules/esnext.json.raw-json.js +2 -85
  44. package/modules/esnext.weak-map.get-or-insert-computed.js +12 -1
  45. package/modules/web.url-search-params.constructor.js +1 -1
  46. package/package.json +3 -1
  47. package/proposals/iterator-chunking-v2.js +4 -0
  48. package/stable/index.js +4 -0
  49. package/stable/iterator/concat.js +5 -0
  50. package/stable/json/is-raw-json.js +4 -0
  51. package/stable/json/parse.js +4 -0
  52. package/stable/json/raw-json.js +4 -0
  53. package/stage/2.7.js +1 -1
  54. package/stage/2.js +0 -1
  55. package/stage/3.js +1 -2
  56. package/stage/4.js +2 -0
  57. package/internals/get-json-replacer-function.js +0 -30
@@ -1,251 +1,3 @@
1
1
  'use strict';
2
- var $ = require('../internals/export');
3
- var DESCRIPTORS = require('../internals/descriptors');
4
- var globalThis = require('../internals/global-this');
5
- var getBuiltIn = require('../internals/get-built-in');
6
- var uncurryThis = require('../internals/function-uncurry-this');
7
- var call = require('../internals/function-call');
8
- var isCallable = require('../internals/is-callable');
9
- var isObject = require('../internals/is-object');
10
- var isArray = require('../internals/is-array');
11
- var hasOwn = require('../internals/has-own-property');
12
- var toString = require('../internals/to-string');
13
- var lengthOfArrayLike = require('../internals/length-of-array-like');
14
- var createProperty = require('../internals/create-property');
15
- var fails = require('../internals/fails');
16
- var parseJSONString = require('../internals/parse-json-string');
17
- var NATIVE_SYMBOL = require('../internals/symbol-constructor-detection');
18
-
19
- var JSON = globalThis.JSON;
20
- var Number = globalThis.Number;
21
- var SyntaxError = globalThis.SyntaxError;
22
- var nativeParse = JSON && JSON.parse;
23
- var enumerableOwnProperties = getBuiltIn('Object', 'keys');
24
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
25
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
26
- var at = uncurryThis(''.charAt);
27
- var slice = uncurryThis(''.slice);
28
- var exec = uncurryThis(/./.exec);
29
- var push = uncurryThis([].push);
30
-
31
- var IS_DIGIT = /^\d$/;
32
- var IS_NON_ZERO_DIGIT = /^[1-9]$/;
33
- var IS_NUMBER_START = /^[\d-]$/;
34
- var IS_WHITESPACE = /^[\t\n\r ]$/;
35
-
36
- var PRIMITIVE = 0;
37
- var OBJECT = 1;
38
-
39
- var $parse = function (source, reviver) {
40
- source = toString(source);
41
- var context = new Context(source, 0, '');
42
- var root = context.parse();
43
- var value = root.value;
44
- var endIndex = context.skip(IS_WHITESPACE, root.end);
45
- if (endIndex < source.length) {
46
- throw new SyntaxError('Unexpected extra character: "' + at(source, endIndex) + '" after the parsed data at: ' + endIndex);
47
- }
48
- return isCallable(reviver) ? internalize({ '': value }, '', reviver, root) : value;
49
- };
50
-
51
- var internalize = function (holder, name, reviver, node) {
52
- var val = holder[name];
53
- var unmodified = node && val === node.value;
54
- var context = unmodified && typeof node.source == 'string' ? { source: node.source } : {};
55
- var elementRecordsLen, keys, len, i, P;
56
- if (isObject(val)) {
57
- var nodeIsArray = isArray(val);
58
- var nodes = unmodified ? node.nodes : nodeIsArray ? [] : {};
59
- if (nodeIsArray) {
60
- elementRecordsLen = nodes.length;
61
- len = lengthOfArrayLike(val);
62
- for (i = 0; i < len; i++) {
63
- internalizeProperty(val, i, internalize(val, '' + i, reviver, i < elementRecordsLen ? nodes[i] : undefined));
64
- }
65
- } else {
66
- keys = enumerableOwnProperties(val);
67
- len = lengthOfArrayLike(keys);
68
- for (i = 0; i < len; i++) {
69
- P = keys[i];
70
- internalizeProperty(val, P, internalize(val, P, reviver, hasOwn(nodes, P) ? nodes[P] : undefined));
71
- }
72
- }
73
- }
74
- return call(reviver, holder, name, val, context);
75
- };
76
-
77
- var internalizeProperty = function (object, key, value) {
78
- if (DESCRIPTORS) {
79
- var descriptor = getOwnPropertyDescriptor(object, key);
80
- if (descriptor && !descriptor.configurable) return;
81
- }
82
- if (value === undefined) delete object[key];
83
- else createProperty(object, key, value);
84
- };
85
-
86
- var Node = function (value, end, source, nodes) {
87
- this.value = value;
88
- this.end = end;
89
- this.source = source;
90
- this.nodes = nodes;
91
- };
92
-
93
- var Context = function (source, index) {
94
- this.source = source;
95
- this.index = index;
96
- };
97
-
98
- // https://www.json.org/json-en.html
99
- Context.prototype = {
100
- fork: function (nextIndex) {
101
- return new Context(this.source, nextIndex);
102
- },
103
- parse: function () {
104
- var source = this.source;
105
- var i = this.skip(IS_WHITESPACE, this.index);
106
- var fork = this.fork(i);
107
- var chr = at(source, i);
108
- if (exec(IS_NUMBER_START, chr)) return fork.number();
109
- switch (chr) {
110
- case '{':
111
- return fork.object();
112
- case '[':
113
- return fork.array();
114
- case '"':
115
- return fork.string();
116
- case 't':
117
- return fork.keyword(true);
118
- case 'f':
119
- return fork.keyword(false);
120
- case 'n':
121
- return fork.keyword(null);
122
- } throw new SyntaxError('Unexpected character: "' + chr + '" at: ' + i);
123
- },
124
- node: function (type, value, start, end, nodes) {
125
- return new Node(value, end, type ? null : slice(this.source, start, end), nodes);
126
- },
127
- object: function () {
128
- var source = this.source;
129
- var i = this.index + 1;
130
- var expectKeypair = false;
131
- var object = {};
132
- var nodes = {};
133
- while (i < source.length) {
134
- i = this.until(['"', '}'], i);
135
- if (at(source, i) === '}' && !expectKeypair) {
136
- i++;
137
- break;
138
- }
139
- // Parsing the key
140
- var result = this.fork(i).string();
141
- var key = result.value;
142
- i = result.end;
143
- i = this.until([':'], i) + 1;
144
- // Parsing value
145
- i = this.skip(IS_WHITESPACE, i);
146
- result = this.fork(i).parse();
147
- createProperty(nodes, key, result);
148
- createProperty(object, key, result.value);
149
- i = this.until([',', '}'], result.end);
150
- var chr = at(source, i);
151
- if (chr === ',') {
152
- expectKeypair = true;
153
- i++;
154
- } else if (chr === '}') {
155
- i++;
156
- break;
157
- }
158
- }
159
- return this.node(OBJECT, object, this.index, i, nodes);
160
- },
161
- array: function () {
162
- var source = this.source;
163
- var i = this.index + 1;
164
- var expectElement = false;
165
- var array = [];
166
- var nodes = [];
167
- while (i < source.length) {
168
- i = this.skip(IS_WHITESPACE, i);
169
- if (at(source, i) === ']' && !expectElement) {
170
- i++;
171
- break;
172
- }
173
- var result = this.fork(i).parse();
174
- push(nodes, result);
175
- push(array, result.value);
176
- i = this.until([',', ']'], result.end);
177
- if (at(source, i) === ',') {
178
- expectElement = true;
179
- i++;
180
- } else if (at(source, i) === ']') {
181
- i++;
182
- break;
183
- }
184
- }
185
- return this.node(OBJECT, array, this.index, i, nodes);
186
- },
187
- string: function () {
188
- var index = this.index;
189
- var parsed = parseJSONString(this.source, this.index + 1);
190
- return this.node(PRIMITIVE, parsed.value, index, parsed.end);
191
- },
192
- number: function () {
193
- var source = this.source;
194
- var startIndex = this.index;
195
- var i = startIndex;
196
- if (at(source, i) === '-') i++;
197
- if (at(source, i) === '0') i++;
198
- else if (exec(IS_NON_ZERO_DIGIT, at(source, i))) i = this.skip(IS_DIGIT, i + 1);
199
- else throw new SyntaxError('Failed to parse number at: ' + i);
200
- if (at(source, i) === '.') i = this.skip(IS_DIGIT, i + 1);
201
- if (at(source, i) === 'e' || at(source, i) === 'E') {
202
- i++;
203
- if (at(source, i) === '+' || at(source, i) === '-') i++;
204
- var exponentStartIndex = i;
205
- i = this.skip(IS_DIGIT, i);
206
- if (exponentStartIndex === i) throw new SyntaxError("Failed to parse number's exponent value at: " + i);
207
- }
208
- return this.node(PRIMITIVE, Number(slice(source, startIndex, i)), startIndex, i);
209
- },
210
- keyword: function (value) {
211
- var keyword = '' + value;
212
- var index = this.index;
213
- var endIndex = index + keyword.length;
214
- if (slice(this.source, index, endIndex) !== keyword) throw new SyntaxError('Failed to parse value at: ' + index);
215
- return this.node(PRIMITIVE, value, index, endIndex);
216
- },
217
- skip: function (regex, i) {
218
- var source = this.source;
219
- for (; i < source.length; i++) if (!exec(regex, at(source, i))) break;
220
- return i;
221
- },
222
- until: function (array, i) {
223
- i = this.skip(IS_WHITESPACE, i);
224
- var chr = at(this.source, i);
225
- for (var j = 0; j < array.length; j++) if (array[j] === chr) return i;
226
- throw new SyntaxError('Unexpected character: "' + chr + '" at: ' + i);
227
- }
228
- };
229
-
230
- var NO_SOURCE_SUPPORT = fails(function () {
231
- var unsafeInt = '9007199254740993';
232
- var source;
233
- nativeParse(unsafeInt, function (key, value, context) {
234
- source = context.source;
235
- });
236
- return source !== unsafeInt;
237
- });
238
-
239
- var PROPER_BASE_PARSE = NATIVE_SYMBOL && !fails(function () {
240
- // Safari 9 bug
241
- return 1 / nativeParse('-0 \t') !== -Infinity;
242
- });
243
-
244
- // `JSON.parse` method
245
- // https://tc39.es/ecma262/#sec-json.parse
246
- // https://github.com/tc39/proposal-json-parse-with-source
247
- $({ target: 'JSON', stat: true, forced: NO_SOURCE_SUPPORT }, {
248
- parse: function parse(text, reviver) {
249
- return PROPER_BASE_PARSE && !isCallable(reviver) ? nativeParse(text) : $parse(text, reviver);
250
- }
251
- });
2
+ // TODO: Remove from `core-js@4`
3
+ require('../modules/es.json.parse');
@@ -1,86 +1,3 @@
1
1
  'use strict';
2
- var $ = require('../internals/export');
3
- var FREEZING = require('../internals/freezing');
4
- var NATIVE_RAW_JSON = require('../internals/native-raw-json');
5
- var getBuiltIn = require('../internals/get-built-in');
6
- var call = require('../internals/function-call');
7
- var uncurryThis = require('../internals/function-uncurry-this');
8
- var isCallable = require('../internals/is-callable');
9
- var isRawJSON = require('../internals/is-raw-json');
10
- var toString = require('../internals/to-string');
11
- var createProperty = require('../internals/create-property');
12
- var parseJSONString = require('../internals/parse-json-string');
13
- var getReplacerFunction = require('../internals/get-json-replacer-function');
14
- var uid = require('../internals/uid');
15
- var setInternalState = require('../internals/internal-state').set;
16
-
17
- var $String = String;
18
- var $SyntaxError = SyntaxError;
19
- var parse = getBuiltIn('JSON', 'parse');
20
- var $stringify = getBuiltIn('JSON', 'stringify');
21
- var create = getBuiltIn('Object', 'create');
22
- var freeze = getBuiltIn('Object', 'freeze');
23
- var at = uncurryThis(''.charAt);
24
- var slice = uncurryThis(''.slice);
25
- var push = uncurryThis([].push);
26
-
27
- var MARK = uid();
28
- var MARK_LENGTH = MARK.length;
29
- var ERROR_MESSAGE = 'Unacceptable as raw JSON';
30
-
31
- var isWhitespace = function (it) {
32
- return it === ' ' || it === '\t' || it === '\n' || it === '\r';
33
- };
34
-
35
- // `JSON.rawJSON` method
36
- // https://tc39.es/proposal-json-parse-with-source/#sec-json.rawjson
37
- // https://github.com/tc39/proposal-json-parse-with-source
38
- $({ target: 'JSON', stat: true, forced: !NATIVE_RAW_JSON }, {
39
- rawJSON: function rawJSON(text) {
40
- var jsonString = toString(text);
41
- if (jsonString === '' || isWhitespace(at(jsonString, 0)) || isWhitespace(at(jsonString, jsonString.length - 1))) {
42
- throw new $SyntaxError(ERROR_MESSAGE);
43
- }
44
- var parsed = parse(jsonString);
45
- if (typeof parsed == 'object' && parsed !== null) throw new $SyntaxError(ERROR_MESSAGE);
46
- var obj = create(null);
47
- setInternalState(obj, { type: 'RawJSON' });
48
- createProperty(obj, 'rawJSON', jsonString);
49
- return FREEZING ? freeze(obj) : obj;
50
- }
51
- });
52
-
53
- // `JSON.stringify` method
54
- // https://tc39.es/ecma262/#sec-json.stringify
55
- // https://github.com/tc39/proposal-json-parse-with-source
56
- if ($stringify) $({ target: 'JSON', stat: true, arity: 3, forced: !NATIVE_RAW_JSON }, {
57
- stringify: function stringify(text, replacer, space) {
58
- var replacerFunction = getReplacerFunction(replacer);
59
- var rawStrings = [];
60
-
61
- var json = $stringify(text, function (key, value) {
62
- // some old implementations (like WebKit) could pass numbers as keys
63
- var v = isCallable(replacerFunction) ? call(replacerFunction, this, $String(key), value) : value;
64
- return isRawJSON(v) ? MARK + (push(rawStrings, v.rawJSON) - 1) : v;
65
- }, space);
66
-
67
- if (typeof json != 'string') return json;
68
-
69
- var result = '';
70
- var length = json.length;
71
-
72
- for (var i = 0; i < length; i++) {
73
- var chr = at(json, i);
74
- if (chr === '"') {
75
- var end = parseJSONString(json, ++i).end - 1;
76
- var string = slice(json, i, end);
77
- result += slice(string, 0, MARK_LENGTH) === MARK
78
- ? rawStrings[slice(string, MARK_LENGTH)]
79
- : '"' + string + '"';
80
- i = end;
81
- } else result += chr;
82
- }
83
-
84
- return result;
85
- }
86
- });
2
+ // TODO: Remove from `core-js@4`
3
+ require('../modules/es.json.raw-json');
@@ -10,9 +10,20 @@ var get = WeakMapHelpers.get;
10
10
  var has = WeakMapHelpers.has;
11
11
  var set = WeakMapHelpers.set;
12
12
 
13
+ var FORCED = IS_PURE || !function () {
14
+ try {
15
+ // eslint-disable-next-line es/no-weak-map, no-throw-literal -- testing
16
+ if (WeakMap.prototype.getOrInsertComputed) new WeakMap().getOrInsertComputed(1, function () { throw 1; });
17
+ } catch (error) {
18
+ // FF144 Nightly - Beta 3 bug
19
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=1988369
20
+ return error instanceof TypeError;
21
+ }
22
+ }();
23
+
13
24
  // `WeakMap.prototype.getOrInsertComputed` method
14
25
  // https://github.com/tc39/proposal-upsert
15
- $({ target: 'WeakMap', proto: true, real: true, forced: IS_PURE }, {
26
+ $({ target: 'WeakMap', proto: true, real: true, forced: FORCED }, {
16
27
  getOrInsertComputed: function getOrInsertComputed(key, callbackfn) {
17
28
  aWeakMap(this);
18
29
  aWeakKey(key);
@@ -313,7 +313,7 @@ defineBuiltIns(URLSearchParamsPrototype, {
313
313
  var state = getInternalParamsState(this);
314
314
  validateArgumentsLength(arguments.length, 2);
315
315
  push(state.entries, { key: $toString(name), value: $toString(value) });
316
- if (!DESCRIPTORS) this.length++;
316
+ if (!DESCRIPTORS) this.size++;
317
317
  state.updateURL();
318
318
  },
319
319
  // `URLSearchParams.prototype.delete` method
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-js",
3
- "version": "3.45.1",
3
+ "version": "3.47.0",
4
4
  "type": "commonjs",
5
5
  "description": "Standard library",
6
6
  "keywords": [
@@ -56,6 +56,7 @@
56
56
  "url": "git+https://github.com/zloirock/core-js.git",
57
57
  "directory": "packages/core-js"
58
58
  },
59
+ "homepage": "https://core-js.io",
59
60
  "bugs": {
60
61
  "url": "https://github.com/zloirock/core-js/issues"
61
62
  },
@@ -69,6 +70,7 @@
69
70
  "email": "zloirock@zloirock.ru",
70
71
  "url": "http://zloirock.ru"
71
72
  },
73
+ "sideEffects": true,
72
74
  "main": "index.js",
73
75
  "scripts": {
74
76
  "postinstall": "node -e \"try{require('./postinstall')}catch(e){}\""
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ // https://github.com/tc39/proposal-iterator-chunking
3
+ require('../modules/esnext.iterator.chunks');
4
+ require('../modules/esnext.iterator.windows');
package/stable/index.js CHANGED
@@ -84,6 +84,7 @@ require('../modules/es.function.has-instance');
84
84
  require('../modules/es.function.name');
85
85
  require('../modules/es.global-this');
86
86
  require('../modules/es.iterator.constructor');
87
+ require('../modules/es.iterator.concat');
87
88
  require('../modules/es.iterator.dispose');
88
89
  require('../modules/es.iterator.drop');
89
90
  require('../modules/es.iterator.every');
@@ -97,6 +98,9 @@ require('../modules/es.iterator.reduce');
97
98
  require('../modules/es.iterator.some');
98
99
  require('../modules/es.iterator.take');
99
100
  require('../modules/es.iterator.to-array');
101
+ require('../modules/es.json.is-raw-json');
102
+ require('../modules/es.json.parse');
103
+ require('../modules/es.json.raw-json');
100
104
  require('../modules/es.json.stringify');
101
105
  require('../modules/es.json.to-string-tag');
102
106
  require('../modules/es.map');
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+ var parent = require('../../es/iterator/concat');
3
+ require('../../modules/esnext.iterator.concat');
4
+
5
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/json/is-raw-json');
3
+
4
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/json/parse');
3
+
4
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/json/raw-json');
3
+
4
+ module.exports = parent;
package/stage/2.7.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  var parent = require('./3');
3
3
 
4
- require('../proposals/joint-iteration');
4
+ require('../proposals/iterator-chunking');
5
5
 
6
6
  module.exports = parent;
package/stage/2.js CHANGED
@@ -4,7 +4,6 @@ var parent = require('./2.7');
4
4
  require('../proposals/array-is-template-object');
5
5
  require('../proposals/async-iterator-helpers');
6
6
  require('../proposals/extractors');
7
- require('../proposals/iterator-chunking');
8
7
  require('../proposals/iterator-range');
9
8
  require('../proposals/string-dedent');
10
9
  require('../proposals/symbol-predicates-v2');
package/stage/3.js CHANGED
@@ -2,8 +2,7 @@
2
2
  var parent = require('./4');
3
3
 
4
4
  require('../proposals/decorator-metadata-v2');
5
- require('../proposals/iterator-sequencing');
6
- require('../proposals/json-parse-with-source');
5
+ require('../proposals/joint-iteration');
7
6
  require('../proposals/map-upsert-v4');
8
7
  // TODO: Obsolete versions, remove from `core-js@4`
9
8
  require('../proposals/array-grouping-stage-3');
package/stage/4.js CHANGED
@@ -13,6 +13,8 @@ require('../proposals/float16');
13
13
  require('../proposals/global-this');
14
14
  require('../proposals/is-error');
15
15
  require('../proposals/iterator-helpers-stage-3-2');
16
+ require('../proposals/iterator-sequencing');
17
+ require('../proposals/json-parse-with-source');
16
18
  require('../proposals/math-sum');
17
19
  require('../proposals/promise-all-settled');
18
20
  require('../proposals/promise-any');
@@ -1,30 +0,0 @@
1
- 'use strict';
2
- var uncurryThis = require('../internals/function-uncurry-this');
3
- var isArray = require('../internals/is-array');
4
- var isCallable = require('../internals/is-callable');
5
- var classof = require('../internals/classof-raw');
6
- var toString = require('../internals/to-string');
7
-
8
- var push = uncurryThis([].push);
9
-
10
- module.exports = function (replacer) {
11
- if (isCallable(replacer)) return replacer;
12
- if (!isArray(replacer)) return;
13
- var rawLength = replacer.length;
14
- var keys = [];
15
- for (var i = 0; i < rawLength; i++) {
16
- var element = replacer[i];
17
- if (typeof element == 'string') push(keys, element);
18
- else if (typeof element == 'number' || classof(element) === 'Number' || classof(element) === 'String') push(keys, toString(element));
19
- }
20
- var keysLength = keys.length;
21
- var root = true;
22
- return function (key, value) {
23
- if (root) {
24
- root = false;
25
- return value;
26
- }
27
- if (isArray(this)) return value;
28
- for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;
29
- };
30
- };