Leon4gr45 commited on
Commit
5915f0a
·
verified ·
1 Parent(s): cdcab25

Upload folder using huggingface_hub (part 22)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. node_modules/es-abstract/2019/DayFromYear.js +10 -0
  2. node_modules/es-abstract/2019/DayWithinYear.js +11 -0
  3. node_modules/es-abstract/2019/DaysInYear.js +18 -0
  4. node_modules/es-abstract/2019/DefinePropertyOrThrow.js +39 -0
  5. node_modules/es-abstract/2019/DeletePropertyOrThrow.js +25 -0
  6. node_modules/es-abstract/2019/DetachArrayBuffer.js +46 -0
  7. node_modules/es-abstract/2019/EnumerableOwnPropertyNames.js +37 -0
  8. node_modules/es-abstract/2019/FlattenIntoArray.js +55 -0
  9. node_modules/es-abstract/2019/FromPropertyDescriptor.js +16 -0
  10. node_modules/es-abstract/2019/Get.js +24 -0
  11. node_modules/es-abstract/2019/GetGlobalObject.js +9 -0
  12. node_modules/es-abstract/2019/GetIterator.js +30 -0
  13. node_modules/es-abstract/2019/GetMethod.js +34 -0
  14. node_modules/es-abstract/2019/GetOwnPropertyKeys.js +30 -0
  15. node_modules/es-abstract/2019/GetPrototypeFromConstructor.js +33 -0
  16. node_modules/es-abstract/2019/GetSubstitution.js +120 -0
  17. node_modules/es-abstract/2019/GetV.js +23 -0
  18. node_modules/es-abstract/2019/GetValueFromBuffer.js +94 -0
  19. node_modules/es-abstract/2019/HasOwnProperty.js +20 -0
  20. node_modules/es-abstract/2019/HasProperty.js +18 -0
  21. node_modules/es-abstract/2019/HourFromTime.js +14 -0
  22. node_modules/es-abstract/2019/InLeapYear.js +19 -0
  23. node_modules/es-abstract/2019/InstanceofOperator.js +30 -0
  24. node_modules/es-abstract/2019/IntegerIndexedElementGet.js +58 -0
  25. node_modules/es-abstract/2019/IntegerIndexedElementSet.js +62 -0
  26. node_modules/es-abstract/2019/InternalizeJSONProperty.js +68 -0
  27. node_modules/es-abstract/2019/Invoke.js +22 -0
  28. node_modules/es-abstract/2019/IsAccessorDescriptor.js +25 -0
  29. node_modules/es-abstract/2019/IsArray.js +4 -0
  30. node_modules/es-abstract/2019/IsCallable.js +5 -0
  31. node_modules/es-abstract/2019/IsCompatiblePropertyDescriptor.js +9 -0
  32. node_modules/es-abstract/2019/IsConcatSpreadable.js +26 -0
  33. node_modules/es-abstract/2019/IsConstructor.js +40 -0
  34. node_modules/es-abstract/2019/IsDataDescriptor.js +25 -0
  35. node_modules/es-abstract/2019/IsDetachedBuffer.js +28 -0
  36. node_modules/es-abstract/2019/IsExtensible.js +18 -0
  37. node_modules/es-abstract/2019/IsGenericDescriptor.js +26 -0
  38. node_modules/es-abstract/2019/IsInteger.js +9 -0
  39. node_modules/es-abstract/2019/IsPromise.js +24 -0
  40. node_modules/es-abstract/2019/IsPropertyKey.js +9 -0
  41. node_modules/es-abstract/2019/IsRegExp.js +25 -0
  42. node_modules/es-abstract/2019/IsSharedArrayBuffer.js +16 -0
  43. node_modules/es-abstract/2019/IsStringPrefix.js +43 -0
  44. node_modules/es-abstract/2019/IsWordChar.js +45 -0
  45. node_modules/es-abstract/2019/IterableToList.js +21 -0
  46. node_modules/es-abstract/2019/IteratorClose.js +51 -0
  47. node_modules/es-abstract/2019/IteratorComplete.js +16 -0
  48. node_modules/es-abstract/2019/IteratorNext.js +16 -0
  49. node_modules/es-abstract/2019/IteratorStep.js +13 -0
  50. node_modules/es-abstract/2019/IteratorValue.js +16 -0
node_modules/es-abstract/2019/DayFromYear.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var floor = require('./floor');
4
+
5
+ // https://262.ecma-international.org/5.1/#sec-15.9.1.3
6
+
7
+ module.exports = function DayFromYear(y) {
8
+ return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400);
9
+ };
10
+
node_modules/es-abstract/2019/DayWithinYear.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var Day = require('./Day');
4
+ var DayFromYear = require('./DayFromYear');
5
+ var YearFromTime = require('./YearFromTime');
6
+
7
+ // https://262.ecma-international.org/5.1/#sec-15.9.1.4
8
+
9
+ module.exports = function DayWithinYear(t) {
10
+ return Day(t) - DayFromYear(YearFromTime(t));
11
+ };
node_modules/es-abstract/2019/DaysInYear.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var modulo = require('./modulo');
4
+
5
+ // https://262.ecma-international.org/5.1/#sec-15.9.1.3
6
+
7
+ module.exports = function DaysInYear(y) {
8
+ if (modulo(y, 4) !== 0) {
9
+ return 365;
10
+ }
11
+ if (modulo(y, 100) !== 0) {
12
+ return 366;
13
+ }
14
+ if (modulo(y, 400) !== 0) {
15
+ return 365;
16
+ }
17
+ return 366;
18
+ };
node_modules/es-abstract/2019/DefinePropertyOrThrow.js ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+ var isObject = require('es-object-atoms/isObject');
5
+
6
+ var isPropertyDescriptor = require('../helpers/records/property-descriptor');
7
+ var DefineOwnProperty = require('../helpers/DefineOwnProperty');
8
+
9
+ var FromPropertyDescriptor = require('./FromPropertyDescriptor');
10
+ var IsDataDescriptor = require('./IsDataDescriptor');
11
+ var isPropertyKey = require('../helpers/isPropertyKey');
12
+ var SameValue = require('./SameValue');
13
+ var ToPropertyDescriptor = require('./ToPropertyDescriptor');
14
+
15
+ // https://262.ecma-international.org/6.0/#sec-definepropertyorthrow
16
+
17
+ module.exports = function DefinePropertyOrThrow(O, P, desc) {
18
+ if (!isObject(O)) {
19
+ throw new $TypeError('Assertion failed: Type(O) is not Object');
20
+ }
21
+
22
+ if (!isPropertyKey(P)) {
23
+ throw new $TypeError('Assertion failed: P is not a Property Key');
24
+ }
25
+
26
+ var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc);
27
+ if (!isPropertyDescriptor(Desc)) {
28
+ throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');
29
+ }
30
+
31
+ return DefineOwnProperty(
32
+ IsDataDescriptor,
33
+ SameValue,
34
+ FromPropertyDescriptor,
35
+ O,
36
+ P,
37
+ Desc
38
+ );
39
+ };
node_modules/es-abstract/2019/DeletePropertyOrThrow.js ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+ var isObject = require('es-object-atoms/isObject');
5
+
6
+ var isPropertyKey = require('../helpers/isPropertyKey');
7
+
8
+ // https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow
9
+
10
+ module.exports = function DeletePropertyOrThrow(O, P) {
11
+ if (!isObject(O)) {
12
+ throw new $TypeError('Assertion failed: Type(O) is not Object');
13
+ }
14
+
15
+ if (!isPropertyKey(P)) {
16
+ throw new $TypeError('Assertion failed: P is not a Property Key');
17
+ }
18
+
19
+ // eslint-disable-next-line no-param-reassign
20
+ var success = delete O[P];
21
+ if (!success) {
22
+ throw new $TypeError('Attempt to delete property failed.');
23
+ }
24
+ return success;
25
+ };
node_modules/es-abstract/2019/DetachArrayBuffer.js ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $SyntaxError = require('es-errors/syntax');
4
+ var $TypeError = require('es-errors/type');
5
+
6
+ var IsDetachedBuffer = require('./IsDetachedBuffer');
7
+
8
+ var isArrayBuffer = require('is-array-buffer');
9
+ var isSharedArrayBuffer = require('is-shared-array-buffer');
10
+
11
+ var MessageChannel;
12
+ try {
13
+ // eslint-disable-next-line global-require
14
+ MessageChannel = require('worker_threads').MessageChannel;
15
+ } catch (e) { /**/ }
16
+
17
+ // https://262.ecma-international.org/9.0/#sec-detacharraybuffer
18
+
19
+ /* globals postMessage */
20
+
21
+ module.exports = function DetachArrayBuffer(arrayBuffer) {
22
+ if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) {
23
+ throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer');
24
+ }
25
+
26
+ // commented out since there's no way to set or access this key
27
+ // var key = arguments.length > 1 ? arguments[1] : void undefined;
28
+
29
+ // if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) {
30
+ // throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`');
31
+ // }
32
+
33
+ if (!IsDetachedBuffer(arrayBuffer)) { // node v21.0.0+ throws when you structuredClone a detached buffer
34
+ if (typeof structuredClone === 'function') {
35
+ structuredClone(arrayBuffer, { transfer: [arrayBuffer] });
36
+ } else if (typeof postMessage === 'function') {
37
+ postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners
38
+ } else if (MessageChannel) {
39
+ (new MessageChannel()).port1.postMessage(null, [arrayBuffer]);
40
+ } else {
41
+ throw new $SyntaxError('DetachArrayBuffer is not supported in this environment');
42
+ }
43
+ }
44
+
45
+ return null;
46
+ };
node_modules/es-abstract/2019/EnumerableOwnPropertyNames.js ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+ var isObject = require('es-object-atoms/isObject');
5
+
6
+ var objectKeys = require('object-keys');
7
+ var safePushApply = require('safe-push-apply');
8
+ var callBound = require('call-bound');
9
+
10
+ var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
11
+
12
+ var forEach = require('../helpers/forEach');
13
+
14
+ // https://262.ecma-international.org/8.0/#sec-enumerableownproperties
15
+
16
+ module.exports = function EnumerableOwnPropertyNames(O, kind) {
17
+ if (!isObject(O)) {
18
+ throw new $TypeError('Assertion failed: Type(O) is not Object');
19
+ }
20
+
21
+ var keys = objectKeys(O);
22
+ if (kind === 'key') {
23
+ return keys;
24
+ }
25
+ if (kind === 'value' || kind === 'key+value') {
26
+ var results = [];
27
+ forEach(keys, function (key) {
28
+ if ($isEnumerable(O, key)) {
29
+ safePushApply(results, [
30
+ kind === 'value' ? O[key] : [key, O[key]]
31
+ ]);
32
+ }
33
+ });
34
+ return results;
35
+ }
36
+ throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind);
37
+ };
node_modules/es-abstract/2019/FlattenIntoArray.js ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var MAX_SAFE_INTEGER = require('math-intrinsics/constants/maxSafeInteger');
6
+
7
+ var Call = require('./Call');
8
+ var CreateDataPropertyOrThrow = require('./CreateDataPropertyOrThrow');
9
+ var Get = require('./Get');
10
+ var HasProperty = require('./HasProperty');
11
+ var IsArray = require('./IsArray');
12
+ var ToLength = require('./ToLength');
13
+ var ToString = require('./ToString');
14
+
15
+ // https://262.ecma-international.org/10.0/#sec-flattenintoarray
16
+
17
+ module.exports = function FlattenIntoArray(target, source, sourceLen, start, depth) {
18
+ var mapperFunction;
19
+ if (arguments.length > 5) {
20
+ mapperFunction = arguments[5];
21
+ }
22
+
23
+ var targetIndex = start;
24
+ var sourceIndex = 0;
25
+ while (sourceIndex < sourceLen) {
26
+ var P = ToString(sourceIndex);
27
+ var exists = HasProperty(source, P);
28
+ if (exists === true) {
29
+ var element = Get(source, P);
30
+ if (typeof mapperFunction !== 'undefined') {
31
+ if (arguments.length <= 6) {
32
+ throw new $TypeError('Assertion failed: thisArg is required when mapperFunction is provided');
33
+ }
34
+ element = Call(mapperFunction, arguments[6], [element, sourceIndex, source]);
35
+ }
36
+ var shouldFlatten = false;
37
+ if (depth > 0) {
38
+ shouldFlatten = IsArray(element);
39
+ }
40
+ if (shouldFlatten) {
41
+ var elementLen = ToLength(Get(element, 'length'));
42
+ targetIndex = FlattenIntoArray(target, element, elementLen, targetIndex, depth - 1);
43
+ } else {
44
+ if (targetIndex >= MAX_SAFE_INTEGER) {
45
+ throw new $TypeError('index too large');
46
+ }
47
+ CreateDataPropertyOrThrow(target, ToString(targetIndex), element);
48
+ targetIndex += 1;
49
+ }
50
+ }
51
+ sourceIndex += 1;
52
+ }
53
+
54
+ return targetIndex;
55
+ };
node_modules/es-abstract/2019/FromPropertyDescriptor.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var isPropertyDescriptor = require('../helpers/records/property-descriptor');
6
+ var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');
7
+
8
+ // https://262.ecma-international.org/6.0/#sec-frompropertydescriptor
9
+
10
+ module.exports = function FromPropertyDescriptor(Desc) {
11
+ if (typeof Desc !== 'undefined' && !isPropertyDescriptor(Desc)) {
12
+ throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
13
+ }
14
+
15
+ return fromPropertyDescriptor(Desc);
16
+ };
node_modules/es-abstract/2019/Get.js ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var inspect = require('object-inspect');
6
+
7
+ var isPropertyKey = require('../helpers/isPropertyKey');
8
+
9
+ var isObject = require('es-object-atoms/isObject');
10
+
11
+ // https://262.ecma-international.org/6.0/#sec-get-o-p
12
+
13
+ module.exports = function Get(O, P) {
14
+ // 7.3.1.1
15
+ if (!isObject(O)) {
16
+ throw new $TypeError('Assertion failed: Type(O) is not Object');
17
+ }
18
+ // 7.3.1.2
19
+ if (!isPropertyKey(P)) {
20
+ throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
21
+ }
22
+ // 7.3.1.3
23
+ return O[P];
24
+ };
node_modules/es-abstract/2019/GetGlobalObject.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var getGlobal = require('globalthis/polyfill');
4
+
5
+ // https://262.ecma-international.org/6.0/#sec-getglobalobject
6
+
7
+ module.exports = function GetGlobalObject() {
8
+ return getGlobal();
9
+ };
node_modules/es-abstract/2019/GetIterator.js ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var getIteratorMethod = require('../helpers/getIteratorMethod');
6
+ var AdvanceStringIndex = require('./AdvanceStringIndex');
7
+ var Call = require('./Call');
8
+ var GetMethod = require('./GetMethod');
9
+
10
+ var isObject = require('es-object-atoms/isObject');
11
+
12
+ var ES = {
13
+ AdvanceStringIndex: AdvanceStringIndex,
14
+ GetMethod: GetMethod
15
+ };
16
+
17
+ // https://262.ecma-international.org/6.0/#sec-getiterator
18
+
19
+ module.exports = function GetIterator(obj, method) {
20
+ var actualMethod = method;
21
+ if (arguments.length < 2) {
22
+ actualMethod = getIteratorMethod(ES, obj);
23
+ }
24
+ var iterator = Call(actualMethod, obj);
25
+ if (!isObject(iterator)) {
26
+ throw new $TypeError('iterator must return an object');
27
+ }
28
+
29
+ return iterator;
30
+ };
node_modules/es-abstract/2019/GetMethod.js ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var GetV = require('./GetV');
6
+ var IsCallable = require('./IsCallable');
7
+ var isPropertyKey = require('../helpers/isPropertyKey');
8
+
9
+ var inspect = require('object-inspect');
10
+
11
+ // https://262.ecma-international.org/6.0/#sec-getmethod
12
+
13
+ module.exports = function GetMethod(O, P) {
14
+ // 7.3.9.1
15
+ if (!isPropertyKey(P)) {
16
+ throw new $TypeError('Assertion failed: P is not a Property Key');
17
+ }
18
+
19
+ // 7.3.9.2
20
+ var func = GetV(O, P);
21
+
22
+ // 7.3.9.4
23
+ if (func == null) {
24
+ return void 0;
25
+ }
26
+
27
+ // 7.3.9.5
28
+ if (!IsCallable(func)) {
29
+ throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));
30
+ }
31
+
32
+ // 7.3.9.6
33
+ return func;
34
+ };
node_modules/es-abstract/2019/GetOwnPropertyKeys.js ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var hasSymbols = require('has-symbols')();
6
+
7
+ var $TypeError = require('es-errors/type');
8
+ var isObject = require('es-object-atoms/isObject');
9
+
10
+ var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
11
+ var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true);
12
+ var keys = require('object-keys');
13
+
14
+ // https://262.ecma-international.org/6.0/#sec-getownpropertykeys
15
+
16
+ module.exports = function GetOwnPropertyKeys(O, Type) {
17
+ if (!isObject(O)) {
18
+ throw new $TypeError('Assertion failed: Type(O) is not Object');
19
+ }
20
+ if (Type === 'Symbol') {
21
+ return $gOPS ? $gOPS(O) : [];
22
+ }
23
+ if (Type === 'String') {
24
+ if (!$gOPN) {
25
+ return keys(O);
26
+ }
27
+ return $gOPN(O);
28
+ }
29
+ throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`');
30
+ };
node_modules/es-abstract/2019/GetPrototypeFromConstructor.js ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $Function = GetIntrinsic('%Function%');
6
+ var $TypeError = require('es-errors/type');
7
+ var $SyntaxError = require('es-errors/syntax');
8
+
9
+ var Get = require('./Get');
10
+ var IsConstructor = require('./IsConstructor');
11
+
12
+ var isObject = require('es-object-atoms/isObject');
13
+
14
+ // https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor
15
+
16
+ module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) {
17
+ var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
18
+ if (!isObject(intrinsic)) {
19
+ throw new $TypeError('intrinsicDefaultProto must be an object');
20
+ }
21
+ if (!IsConstructor(constructor)) {
22
+ throw new $TypeError('Assertion failed: `constructor` must be a constructor');
23
+ }
24
+ var proto = Get(constructor, 'prototype');
25
+ if (!isObject(proto)) {
26
+ if (!(constructor instanceof $Function)) {
27
+ // ignore other realms, for now
28
+ throw new $SyntaxError('cross-realm constructors not currently supported');
29
+ }
30
+ proto = intrinsic;
31
+ }
32
+ return proto;
33
+ };
node_modules/es-abstract/2019/GetSubstitution.js ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var callBound = require('call-bound');
6
+ var regexTester = require('safe-regex-test');
7
+ var every = require('../helpers/every');
8
+
9
+ var $charAt = callBound('String.prototype.charAt');
10
+ var $strSlice = callBound('String.prototype.slice');
11
+ var $indexOf = callBound('String.prototype.indexOf');
12
+ var $parseInt = parseInt;
13
+
14
+ var isDigit = regexTester(/^[0-9]$/);
15
+
16
+ var inspect = require('object-inspect');
17
+ var isInteger = require('math-intrinsics/isInteger');
18
+
19
+ var Get = require('./Get');
20
+ var IsArray = require('./IsArray');
21
+ var ToObject = require('./ToObject');
22
+ var ToString = require('./ToString');
23
+
24
+ var isStringOrUndefined = require('../helpers/isStringOrUndefined');
25
+
26
+ // http://262.ecma-international.org/9.0/#sec-getsubstitution
27
+
28
+ // eslint-disable-next-line max-statements, max-params, max-lines-per-function
29
+ module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacement) {
30
+ if (typeof matched !== 'string') {
31
+ throw new $TypeError('Assertion failed: `matched` must be a String');
32
+ }
33
+ var matchLength = matched.length;
34
+
35
+ if (typeof str !== 'string') {
36
+ throw new $TypeError('Assertion failed: `str` must be a String');
37
+ }
38
+ var stringLength = str.length;
39
+
40
+ if (!isInteger(position) || position < 0 || position > stringLength) {
41
+ throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position));
42
+ }
43
+
44
+ if (!IsArray(captures) || !every(captures, isStringOrUndefined)) {
45
+ throw new $TypeError('Assertion failed: `captures` must be a List of Strings or `undefined`, got ' + inspect(captures));
46
+ }
47
+
48
+ if (typeof replacement !== 'string') {
49
+ throw new $TypeError('Assertion failed: `replacement` must be a String');
50
+ }
51
+
52
+ var tailPos = position + matchLength;
53
+ var m = captures.length;
54
+ if (typeof namedCaptures !== 'undefined') {
55
+ namedCaptures = ToObject(namedCaptures); // eslint-disable-line no-param-reassign
56
+ }
57
+
58
+ var result = '';
59
+ for (var i = 0; i < replacement.length; i += 1) {
60
+ // if this is a $, and it's not the end of the replacement
61
+ var current = $charAt(replacement, i);
62
+ var isLast = (i + 1) >= replacement.length;
63
+ var nextIsLast = (i + 2) >= replacement.length;
64
+ if (current === '$' && !isLast) {
65
+ var next = $charAt(replacement, i + 1);
66
+ if (next === '$') {
67
+ result += '$';
68
+ i += 1;
69
+ } else if (next === '&') {
70
+ result += matched;
71
+ i += 1;
72
+ } else if (next === '`') {
73
+ result += position === 0 ? '' : $strSlice(str, 0, position - 1);
74
+ i += 1;
75
+ } else if (next === "'") {
76
+ result += tailPos >= stringLength ? '' : $strSlice(str, tailPos);
77
+ i += 1;
78
+ } else {
79
+ var nextNext = nextIsLast ? null : $charAt(replacement, i + 2);
80
+ if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) {
81
+ // $1 through $9, and not followed by a digit
82
+ var n = $parseInt(next, 10);
83
+ // if (n > m, impl-defined)
84
+ result += n <= m && typeof captures[n - 1] === 'undefined' ? '' : captures[n - 1];
85
+ i += 1;
86
+ } else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) {
87
+ // $00 through $99
88
+ var nn = next + nextNext;
89
+ var nnI = $parseInt(nn, 10) - 1;
90
+ // if nn === '00' or nn > m, impl-defined
91
+ result += nn <= m && typeof captures[nnI] === 'undefined' ? '' : captures[nnI];
92
+ i += 2;
93
+ } else if (next === '<') {
94
+ if (typeof namedCaptures === 'undefined') {
95
+ result += '$<';
96
+ i += 2;
97
+ } else {
98
+ var endIndex = $indexOf(replacement, '>', i);
99
+
100
+ if (endIndex > -1) {
101
+ var groupName = $strSlice(replacement, i + '$<'.length, endIndex);
102
+ var capture = Get(namedCaptures, groupName);
103
+
104
+ if (typeof capture !== 'undefined') {
105
+ result += ToString(capture);
106
+ }
107
+ i += ('<' + groupName + '>').length;
108
+ }
109
+ }
110
+ } else {
111
+ result += '$';
112
+ }
113
+ }
114
+ } else {
115
+ // the final $, or else not a $
116
+ result += $charAt(replacement, i);
117
+ }
118
+ }
119
+ return result;
120
+ };
node_modules/es-abstract/2019/GetV.js ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var inspect = require('object-inspect');
6
+
7
+ var isPropertyKey = require('../helpers/isPropertyKey');
8
+ // var ToObject = require('./ToObject');
9
+
10
+ // https://262.ecma-international.org/6.0/#sec-getv
11
+
12
+ module.exports = function GetV(V, P) {
13
+ // 7.3.2.1
14
+ if (!isPropertyKey(P)) {
15
+ throw new $TypeError('Assertion failed: P is not a Property Key, got ' + inspect(P));
16
+ }
17
+
18
+ // 7.3.2.2-3
19
+ // var O = ToObject(V);
20
+
21
+ // 7.3.2.4
22
+ return V[P];
23
+ };
node_modules/es-abstract/2019/GetValueFromBuffer.js ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $TypeError = require('es-errors/type');
6
+ var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
7
+ var isInteger = require('math-intrinsics/isInteger');
8
+
9
+ var callBound = require('call-bound');
10
+
11
+ var $slice = callBound('Array.prototype.slice');
12
+
13
+ var IsDetachedBuffer = require('./IsDetachedBuffer');
14
+ var RawBytesToNumber = require('./RawBytesToNumber');
15
+
16
+ var isArrayBuffer = require('is-array-buffer');
17
+ var isSharedArrayBuffer = require('is-shared-array-buffer');
18
+ var safeConcat = require('safe-array-concat');
19
+
20
+ var tableTAO = require('./tables/typed-array-objects');
21
+
22
+ var defaultEndianness = require('../helpers/defaultEndianness');
23
+
24
+ // https://262.ecma-international.org/10.0/#sec-getvaluefrombuffer
25
+
26
+ module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) {
27
+ var isSAB = isSharedArrayBuffer(arrayBuffer);
28
+ if (!isArrayBuffer(arrayBuffer) && !isSAB) {
29
+ throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
30
+ }
31
+
32
+ if (!isInteger(byteIndex)) {
33
+ throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
34
+ }
35
+
36
+ if (typeof type !== 'string') {
37
+ throw new $TypeError('Assertion failed: `type` must be a string');
38
+ }
39
+
40
+ if (typeof isTypedArray !== 'boolean') {
41
+ throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
42
+ }
43
+
44
+ if (typeof order !== 'string') {
45
+ throw new $TypeError('Assertion failed: `order` must be a string');
46
+ }
47
+
48
+ if (arguments.length > 5 && typeof arguments[5] !== 'boolean') {
49
+ throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
50
+ }
51
+
52
+ if (IsDetachedBuffer(arrayBuffer)) {
53
+ throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1
54
+ }
55
+
56
+ // 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
57
+
58
+ if (byteIndex < 0) {
59
+ throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3
60
+ }
61
+
62
+ // 4. Let block be arrayBuffer.[[ArrayBufferData]].
63
+
64
+ var elementSize = tableTAO.size['$' + type]; // step 5
65
+ if (!elementSize) {
66
+ throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
67
+ }
68
+
69
+ var rawValue;
70
+ if (isSAB) { // step 6
71
+ /*
72
+ a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
73
+ b. Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier().
74
+ c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false.
75
+ d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values.
76
+ e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency.
77
+ f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }.
78
+ g. Append readEvent to eventList.
79
+ h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]].
80
+ */
81
+ } else {
82
+ // 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex].
83
+ rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6
84
+ }
85
+
86
+ // 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation.
87
+ var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8
88
+
89
+ var bytes = isLittleEndian
90
+ ? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize)
91
+ : $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize);
92
+
93
+ return RawBytesToNumber(type, bytes, isLittleEndian);
94
+ };
node_modules/es-abstract/2019/HasOwnProperty.js ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var hasOwn = require('hasown');
6
+ var isObject = require('es-object-atoms/isObject');
7
+
8
+ var isPropertyKey = require('../helpers/isPropertyKey');
9
+
10
+ // https://262.ecma-international.org/6.0/#sec-hasownproperty
11
+
12
+ module.exports = function HasOwnProperty(O, P) {
13
+ if (!isObject(O)) {
14
+ throw new $TypeError('Assertion failed: `O` must be an Object');
15
+ }
16
+ if (!isPropertyKey(P)) {
17
+ throw new $TypeError('Assertion failed: `P` must be a Property Key');
18
+ }
19
+ return hasOwn(O, P);
20
+ };
node_modules/es-abstract/2019/HasProperty.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+ var isObject = require('es-object-atoms/isObject');
5
+
6
+ var isPropertyKey = require('../helpers/isPropertyKey');
7
+
8
+ // https://262.ecma-international.org/6.0/#sec-hasproperty
9
+
10
+ module.exports = function HasProperty(O, P) {
11
+ if (!isObject(O)) {
12
+ throw new $TypeError('Assertion failed: `O` must be an Object');
13
+ }
14
+ if (!isPropertyKey(P)) {
15
+ throw new $TypeError('Assertion failed: `P` must be a Property Key');
16
+ }
17
+ return P in O;
18
+ };
node_modules/es-abstract/2019/HourFromTime.js ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var floor = require('./floor');
4
+ var modulo = require('./modulo');
5
+
6
+ var timeConstants = require('../helpers/timeConstants');
7
+ var msPerHour = timeConstants.msPerHour;
8
+ var HoursPerDay = timeConstants.HoursPerDay;
9
+
10
+ // https://262.ecma-international.org/5.1/#sec-15.9.1.10
11
+
12
+ module.exports = function HourFromTime(t) {
13
+ return modulo(floor(t / msPerHour), HoursPerDay);
14
+ };
node_modules/es-abstract/2019/InLeapYear.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $EvalError = require('es-errors/eval');
4
+
5
+ var DaysInYear = require('./DaysInYear');
6
+ var YearFromTime = require('./YearFromTime');
7
+
8
+ // https://262.ecma-international.org/5.1/#sec-15.9.1.3
9
+
10
+ module.exports = function InLeapYear(t) {
11
+ var days = DaysInYear(YearFromTime(t));
12
+ if (days === 365) {
13
+ return 0;
14
+ }
15
+ if (days === 366) {
16
+ return 1;
17
+ }
18
+ throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days);
19
+ };
node_modules/es-abstract/2019/InstanceofOperator.js ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $TypeError = require('es-errors/type');
6
+ var isObject = require('es-object-atoms/isObject');
7
+
8
+ var $hasInstance = GetIntrinsic('%Symbol.hasInstance%', true);
9
+
10
+ var Call = require('./Call');
11
+ var GetMethod = require('./GetMethod');
12
+ var IsCallable = require('./IsCallable');
13
+ var OrdinaryHasInstance = require('./OrdinaryHasInstance');
14
+ var ToBoolean = require('./ToBoolean');
15
+
16
+ // https://262.ecma-international.org/6.0/#sec-instanceofoperator
17
+
18
+ module.exports = function InstanceofOperator(O, C) {
19
+ if (!isObject(O)) {
20
+ throw new $TypeError('Assertion failed: Type(O) is not Object');
21
+ }
22
+ var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0;
23
+ if (typeof instOfHandler !== 'undefined') {
24
+ return ToBoolean(Call(instOfHandler, C, [O]));
25
+ }
26
+ if (!IsCallable(C)) {
27
+ throw new $TypeError('`C` is not Callable');
28
+ }
29
+ return OrdinaryHasInstance(C, O);
30
+ };
node_modules/es-abstract/2019/IntegerIndexedElementGet.js ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $SyntaxError = require('es-errors/syntax');
4
+ var $TypeError = require('es-errors/type');
5
+
6
+ var GetValueFromBuffer = require('./GetValueFromBuffer');
7
+ var IsDetachedBuffer = require('./IsDetachedBuffer');
8
+ var IsInteger = require('./IsInteger');
9
+
10
+ var isNegativeZero = require('math-intrinsics/isNegativeZero');
11
+
12
+ var typedArrayLength = require('typed-array-length');
13
+ var typedArrayBuffer = require('typed-array-buffer');
14
+ var typedArrayByteOffset = require('typed-array-byte-offset');
15
+ var whichTypedArray = require('which-typed-array');
16
+
17
+ var tableTAO = require('./tables/typed-array-objects');
18
+
19
+ // https://262.ecma-international.org/8.0/#sec-integerindexedelementget
20
+
21
+ module.exports = function IntegerIndexedElementGet(O, index) {
22
+ if (typeof index !== 'number') {
23
+ throw new $TypeError('`index` must be a Number'); // step 1
24
+ }
25
+ var arrayTypeName = whichTypedArray(O); // step 10
26
+ if (!arrayTypeName) {
27
+ throw new $TypeError('`O` must be a TypedArray'); // step 2
28
+ }
29
+ if (arrayTypeName === 'BigInt64Array' || arrayTypeName === 'BigUint64Array') {
30
+ throw new $SyntaxError('BigInt64Array and BigUint64Array do not exist until ES2020');
31
+ }
32
+
33
+ var buffer = typedArrayBuffer(O); // step 3
34
+
35
+ if (IsDetachedBuffer(buffer)) {
36
+ throw new $TypeError('`O` has a detached buffer'); // step 4
37
+ }
38
+
39
+ if (!IsInteger(index) || isNegativeZero(index)) {
40
+ return void undefined; // steps 5 - 6
41
+ }
42
+
43
+ var length = typedArrayLength(O); // step 7
44
+
45
+ if (index < 0 || index >= length) {
46
+ return void undefined; // step 8
47
+ }
48
+
49
+ var offset = typedArrayByteOffset(O); // step 9
50
+
51
+ var elementType = tableTAO.name['$' + arrayTypeName]; // step 13
52
+
53
+ var elementSize = tableTAO.size['$' + elementType]; // step 11
54
+
55
+ var indexedPosition = (index * elementSize) + offset; // step 12
56
+
57
+ return GetValueFromBuffer(buffer, indexedPosition, elementType, true, 'Unordered'); // step 14
58
+ };
node_modules/es-abstract/2019/IntegerIndexedElementSet.js ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $SyntaxError = require('es-errors/syntax');
4
+ var $TypeError = require('es-errors/type');
5
+
6
+ var IsDetachedBuffer = require('./IsDetachedBuffer');
7
+ var IsInteger = require('./IsInteger');
8
+ var SetValueInBuffer = require('./SetValueInBuffer');
9
+ var ToNumber = require('./ToNumber');
10
+
11
+ var isNegativeZero = require('math-intrinsics/isNegativeZero');
12
+ var typedArrayBuffer = require('typed-array-buffer');
13
+ var typedArrayByteOffset = require('typed-array-byte-offset');
14
+ var typedArrayLength = require('typed-array-length');
15
+ var whichTypedArray = require('which-typed-array');
16
+
17
+ var tableTAO = require('./tables/typed-array-objects');
18
+
19
+ // https://262.ecma-international.org/8.0/#sec-integerindexedelementset
20
+
21
+ module.exports = function IntegerIndexedElementSet(O, index, value) {
22
+ if (typeof index !== 'number') {
23
+ throw new $TypeError('`index` must be a Number'); // step 1
24
+ }
25
+ var arrayTypeName = whichTypedArray(O); // step 12
26
+ if (!arrayTypeName) {
27
+ throw new $TypeError('`O` must be a TypedArray'); // step 2
28
+ }
29
+ if (arrayTypeName === 'BigInt64Array' || arrayTypeName === 'BigUint64Array') {
30
+ throw new $SyntaxError('BigInt64Array and BigUint64Array do not exist until ES2020'); // step 2
31
+ }
32
+
33
+ var numValue = ToNumber(value); // step 3
34
+
35
+ var buffer = typedArrayBuffer(O); // step 5
36
+
37
+ if (IsDetachedBuffer(buffer)) {
38
+ throw new $TypeError('`O` has a detached buffer'); // step 6
39
+ }
40
+
41
+ if (!IsInteger(index) || isNegativeZero(index)) {
42
+ return false; // steps 7 - 8
43
+ }
44
+
45
+ var length = typedArrayLength(O); // step 9
46
+
47
+ if (index < 0 || index >= length) {
48
+ return false; // step 10
49
+ }
50
+
51
+ var offset = typedArrayByteOffset(O); // step 11
52
+
53
+ var elementType = tableTAO.name['$' + arrayTypeName]; // step 15
54
+
55
+ var elementSize = tableTAO.size['$' + elementType]; // step 13
56
+
57
+ var indexedPosition = (index * elementSize) + offset; // step 14
58
+
59
+ SetValueInBuffer(buffer, indexedPosition, elementType, numValue, true, 'Unordered'); // step 16
60
+
61
+ return true; // step 17
62
+ };
node_modules/es-abstract/2019/InternalizeJSONProperty.js ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+ var isObject = require('es-object-atoms/isObject');
5
+
6
+ var Call = require('./Call');
7
+ var CreateDataProperty = require('./CreateDataProperty');
8
+ var EnumerableOwnPropertyNames = require('./EnumerableOwnPropertyNames');
9
+ var Get = require('./Get');
10
+ var IsArray = require('./IsArray');
11
+ var ToLength = require('./ToLength');
12
+ var ToString = require('./ToString');
13
+
14
+ var forEach = require('../helpers/forEach');
15
+
16
+ // https://262.ecma-international.org/9.0/#sec-internalizejsonproperty
17
+
18
+ // note: `reviver` was implicitly closed-over until ES2020, where it becomes a third argument
19
+
20
+ module.exports = function InternalizeJSONProperty(holder, name, reviver) {
21
+ if (!isObject(holder)) {
22
+ throw new $TypeError('Assertion failed: `holder` is not an Object');
23
+ }
24
+ if (typeof name !== 'string') {
25
+ throw new $TypeError('Assertion failed: `name` is not a String');
26
+ }
27
+ if (typeof reviver !== 'function') {
28
+ throw new $TypeError('Assertion failed: `reviver` is not a Function');
29
+ }
30
+
31
+ var val = Get(holder, name); // step 1
32
+
33
+ if (isObject(val)) { // step 2
34
+ var isArray = IsArray(val); // step 2.a
35
+ if (isArray) { // step 2.b
36
+ var I = 0; // step 2.b.i
37
+
38
+ var len = ToLength(Get(val, 'length')); // step 2.b.ii
39
+
40
+ while (I < len) { // step 2.b.iii
41
+ var newElement = InternalizeJSONProperty(val, ToString(I), reviver); // step 2.b.iv.1
42
+
43
+ if (typeof newElement === 'undefined') { // step 2.b.iii.2
44
+ delete val[ToString(I)]; // step 2.b.iii.2.a
45
+ } else { // step 2.b.iii.3
46
+ CreateDataProperty(val, ToString(I), newElement); // step 2.b.iii.3.a
47
+ }
48
+
49
+ I += 1; // step 2.b.iii.4
50
+ }
51
+ } else { // step 2.c
52
+ var keys = EnumerableOwnPropertyNames(val, 'key'); // step 2.c.i
53
+
54
+ forEach(keys, function (P) { // step 2.c.ii
55
+ // eslint-disable-next-line no-shadow
56
+ var newElement = InternalizeJSONProperty(val, P, reviver); // step 2.c.ii.1
57
+
58
+ if (typeof newElement === 'undefined') { // step 2.c.ii.2
59
+ delete val[P]; // step 2.c.ii.2.a
60
+ } else { // step 2.c.ii.3
61
+ CreateDataProperty(val, P, newElement); // step 2.c.ii.3.a
62
+ }
63
+ });
64
+ }
65
+ }
66
+
67
+ return Call(reviver, holder, [name, val]); // step 3
68
+ };
node_modules/es-abstract/2019/Invoke.js ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var Call = require('./Call');
6
+ var IsArray = require('./IsArray');
7
+ var GetV = require('./GetV');
8
+ var isPropertyKey = require('../helpers/isPropertyKey');
9
+
10
+ // https://262.ecma-international.org/6.0/#sec-invoke
11
+
12
+ module.exports = function Invoke(O, P) {
13
+ if (!isPropertyKey(P)) {
14
+ throw new $TypeError('Assertion failed: P must be a Property Key');
15
+ }
16
+ var argumentsList = arguments.length > 2 ? arguments[2] : [];
17
+ if (!IsArray(argumentsList)) {
18
+ throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
19
+ }
20
+ var func = GetV(O, P);
21
+ return Call(func, O, argumentsList);
22
+ };
node_modules/es-abstract/2019/IsAccessorDescriptor.js ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var hasOwn = require('hasown');
6
+
7
+ var isPropertyDescriptor = require('../helpers/records/property-descriptor');
8
+
9
+ // https://262.ecma-international.org/5.1/#sec-8.10.1
10
+
11
+ module.exports = function IsAccessorDescriptor(Desc) {
12
+ if (typeof Desc === 'undefined') {
13
+ return false;
14
+ }
15
+
16
+ if (!isPropertyDescriptor(Desc)) {
17
+ throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
18
+ }
19
+
20
+ if (!hasOwn(Desc, '[[Get]]') && !hasOwn(Desc, '[[Set]]')) {
21
+ return false;
22
+ }
23
+
24
+ return true;
25
+ };
node_modules/es-abstract/2019/IsArray.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ // https://262.ecma-international.org/6.0/#sec-isarray
4
+ module.exports = require('../helpers/IsArray');
node_modules/es-abstract/2019/IsCallable.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ // http://262.ecma-international.org/5.1/#sec-9.11
4
+
5
+ module.exports = require('is-callable');
node_modules/es-abstract/2019/IsCompatiblePropertyDescriptor.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor');
4
+
5
+ // https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor
6
+
7
+ module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) {
8
+ return ValidateAndApplyPropertyDescriptor(undefined, undefined, Extensible, Desc, Current);
9
+ };
node_modules/es-abstract/2019/IsConcatSpreadable.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true);
6
+
7
+ var Get = require('./Get');
8
+ var IsArray = require('./IsArray');
9
+ var ToBoolean = require('./ToBoolean');
10
+
11
+ var isObject = require('es-object-atoms/isObject');
12
+
13
+ // https://262.ecma-international.org/6.0/#sec-isconcatspreadable
14
+
15
+ module.exports = function IsConcatSpreadable(O) {
16
+ if (!isObject(O)) {
17
+ return false;
18
+ }
19
+ if ($isConcatSpreadable) {
20
+ var spreadable = Get(O, $isConcatSpreadable);
21
+ if (typeof spreadable !== 'undefined') {
22
+ return ToBoolean(spreadable);
23
+ }
24
+ }
25
+ return IsArray(O);
26
+ };
node_modules/es-abstract/2019/IsConstructor.js ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('../GetIntrinsic.js');
4
+
5
+ var $construct = GetIntrinsic('%Reflect.construct%', true);
6
+
7
+ var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
8
+ try {
9
+ DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });
10
+ } catch (e) {
11
+ // Accessor properties aren't supported
12
+ DefinePropertyOrThrow = null;
13
+ }
14
+
15
+ // https://262.ecma-international.org/6.0/#sec-isconstructor
16
+
17
+ if (DefinePropertyOrThrow && $construct) {
18
+ var isConstructorMarker = {};
19
+ var badArrayLike = {};
20
+ DefinePropertyOrThrow(badArrayLike, 'length', {
21
+ '[[Get]]': function () {
22
+ throw isConstructorMarker;
23
+ },
24
+ '[[Enumerable]]': true
25
+ });
26
+
27
+ module.exports = function IsConstructor(argument) {
28
+ try {
29
+ // `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:
30
+ $construct(argument, badArrayLike);
31
+ } catch (err) {
32
+ return err === isConstructorMarker;
33
+ }
34
+ };
35
+ } else {
36
+ module.exports = function IsConstructor(argument) {
37
+ // unfortunately there's no way to truly check this without try/catch `new argument` in old environments
38
+ return typeof argument === 'function' && !!argument.prototype;
39
+ };
40
+ }
node_modules/es-abstract/2019/IsDataDescriptor.js ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var hasOwn = require('hasown');
6
+
7
+ var isPropertyDescriptor = require('../helpers/records/property-descriptor');
8
+
9
+ // https://262.ecma-international.org/5.1/#sec-8.10.2
10
+
11
+ module.exports = function IsDataDescriptor(Desc) {
12
+ if (typeof Desc === 'undefined') {
13
+ return false;
14
+ }
15
+
16
+ if (!isPropertyDescriptor(Desc)) {
17
+ throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
18
+ }
19
+
20
+ if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) {
21
+ return false;
22
+ }
23
+
24
+ return true;
25
+ };
node_modules/es-abstract/2019/IsDetachedBuffer.js ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var $byteLength = require('array-buffer-byte-length');
6
+ var availableTypedArrays = require('available-typed-arrays')();
7
+ var callBound = require('call-bound');
8
+ var isArrayBuffer = require('is-array-buffer');
9
+ var isSharedArrayBuffer = require('is-shared-array-buffer');
10
+
11
+ var $sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
12
+
13
+ // https://262.ecma-international.org/8.0/#sec-isdetachedbuffer
14
+
15
+ module.exports = function IsDetachedBuffer(arrayBuffer) {
16
+ var isSAB = isSharedArrayBuffer(arrayBuffer);
17
+ if (!isArrayBuffer(arrayBuffer) && !isSAB) {
18
+ throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot');
19
+ }
20
+ if ((isSAB ? $sabByteLength : $byteLength)(arrayBuffer) === 0) {
21
+ try {
22
+ new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new
23
+ } catch (error) {
24
+ return !!error && error.name === 'TypeError';
25
+ }
26
+ }
27
+ return false;
28
+ };
node_modules/es-abstract/2019/IsExtensible.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
6
+ var $isExtensible = GetIntrinsic('%Object.isExtensible%', true);
7
+
8
+ var isPrimitive = require('../helpers/isPrimitive');
9
+
10
+ // https://262.ecma-international.org/6.0/#sec-isextensible-o
11
+
12
+ module.exports = $preventExtensions
13
+ ? function IsExtensible(obj) {
14
+ return !isPrimitive(obj) && $isExtensible(obj);
15
+ }
16
+ : function IsExtensible(obj) {
17
+ return !isPrimitive(obj);
18
+ };
node_modules/es-abstract/2019/IsGenericDescriptor.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var IsAccessorDescriptor = require('./IsAccessorDescriptor');
6
+ var IsDataDescriptor = require('./IsDataDescriptor');
7
+
8
+ var isPropertyDescriptor = require('../helpers/records/property-descriptor');
9
+
10
+ // https://262.ecma-international.org/6.0/#sec-isgenericdescriptor
11
+
12
+ module.exports = function IsGenericDescriptor(Desc) {
13
+ if (typeof Desc === 'undefined') {
14
+ return false;
15
+ }
16
+
17
+ if (!isPropertyDescriptor(Desc)) {
18
+ throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
19
+ }
20
+
21
+ if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) {
22
+ return true;
23
+ }
24
+
25
+ return false;
26
+ };
node_modules/es-abstract/2019/IsInteger.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var isInteger = require('math-intrinsics/isInteger');
4
+
5
+ // https://262.ecma-international.org/6.0/#sec-isinteger
6
+
7
+ module.exports = function IsInteger(argument) {
8
+ return isInteger(argument);
9
+ };
node_modules/es-abstract/2019/IsPromise.js ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var callBound = require('call-bound');
4
+
5
+ var $PromiseThen = callBound('Promise.prototype.then', true);
6
+
7
+ var isObject = require('es-object-atoms/isObject');
8
+
9
+ // https://262.ecma-international.org/6.0/#sec-ispromise
10
+
11
+ module.exports = function IsPromise(x) {
12
+ if (!isObject(x)) {
13
+ return false;
14
+ }
15
+ if (!$PromiseThen) { // Promises are not supported
16
+ return false;
17
+ }
18
+ try {
19
+ $PromiseThen(x); // throws if not a promise
20
+ } catch (e) {
21
+ return false;
22
+ }
23
+ return true;
24
+ };
node_modules/es-abstract/2019/IsPropertyKey.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var isPropertyKey = require('../helpers/isPropertyKey');
4
+
5
+ // https://262.ecma-international.org/6.0/#sec-ispropertykey
6
+
7
+ module.exports = function IsPropertyKey(argument) {
8
+ return isPropertyKey(argument);
9
+ };
node_modules/es-abstract/2019/IsRegExp.js ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $match = GetIntrinsic('%Symbol.match%', true);
6
+
7
+ var hasRegExpMatcher = require('is-regex');
8
+ var isObject = require('es-object-atoms/isObject');
9
+
10
+ var ToBoolean = require('./ToBoolean');
11
+
12
+ // https://262.ecma-international.org/6.0/#sec-isregexp
13
+
14
+ module.exports = function IsRegExp(argument) {
15
+ if (!isObject(argument)) {
16
+ return false;
17
+ }
18
+ if ($match) {
19
+ var isRegExp = argument[$match];
20
+ if (typeof isRegExp !== 'undefined') {
21
+ return ToBoolean(isRegExp);
22
+ }
23
+ }
24
+ return hasRegExpMatcher(argument);
25
+ };
node_modules/es-abstract/2019/IsSharedArrayBuffer.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+ var isObject = require('es-object-atoms/isObject');
5
+
6
+ var isSharedArrayBuffer = require('is-shared-array-buffer');
7
+
8
+ // https://262.ecma-international.org/8.0/#sec-issharedarraybuffer
9
+
10
+ module.exports = function IsSharedArrayBuffer(obj) {
11
+ if (!isObject(obj)) {
12
+ throw new $TypeError('Assertion failed: Type(O) is not Object');
13
+ }
14
+
15
+ return isSharedArrayBuffer(obj);
16
+ };
node_modules/es-abstract/2019/IsStringPrefix.js ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var isPrefixOf = require('../helpers/isPrefixOf');
6
+
7
+ // var callBound = require('call-bound');
8
+
9
+ // var $charAt = callBound('String.prototype.charAt');
10
+
11
+ // https://262.ecma-international.org/9.0/#sec-isstringprefix
12
+
13
+ module.exports = function IsStringPrefix(p, q) {
14
+ if (typeof p !== 'string') {
15
+ throw new $TypeError('Assertion failed: "p" must be a String');
16
+ }
17
+
18
+ if (typeof q !== 'string') {
19
+ throw new $TypeError('Assertion failed: "q" must be a String');
20
+ }
21
+
22
+ return isPrefixOf(p, q);
23
+ /*
24
+ if (p === q || p === '') {
25
+ return true;
26
+ }
27
+
28
+ var pLength = p.length;
29
+ var qLength = q.length;
30
+ if (pLength >= qLength) {
31
+ return false;
32
+ }
33
+
34
+ // assert: pLength < qLength
35
+
36
+ for (var i = 0; i < pLength; i += 1) {
37
+ if ($charAt(p, i) !== $charAt(q, i)) {
38
+ return false;
39
+ }
40
+ }
41
+ return true;
42
+ */
43
+ };
node_modules/es-abstract/2019/IsWordChar.js ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+
5
+ var callBound = require('call-bound');
6
+
7
+ var $indexOf = callBound('String.prototype.indexOf');
8
+
9
+ var IsArray = require('./IsArray');
10
+ var IsInteger = require('./IsInteger');
11
+ var WordCharacters = require('./WordCharacters');
12
+
13
+ var every = require('../helpers/every');
14
+
15
+ var isChar = function isChar(c) {
16
+ return typeof c === 'string';
17
+ };
18
+
19
+ // https://262.ecma-international.org/8.0/#sec-runtime-semantics-iswordchar-abstract-operation
20
+
21
+ // note: prior to ES2023, this AO erroneously omitted the latter of its arguments.
22
+ module.exports = function IsWordChar(e, InputLength, Input, IgnoreCase, Unicode) {
23
+ if (!IsInteger(e)) {
24
+ throw new $TypeError('Assertion failed: `e` must be an integer');
25
+ }
26
+ if (!IsInteger(InputLength)) {
27
+ throw new $TypeError('Assertion failed: `InputLength` must be an integer');
28
+ }
29
+ if (!IsArray(Input) || !every(Input, isChar)) {
30
+ throw new $TypeError('Assertion failed: `Input` must be a List of characters');
31
+ }
32
+ if (typeof IgnoreCase !== 'boolean' || typeof Unicode !== 'boolean') {
33
+ throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans');
34
+ }
35
+
36
+ if (e === -1 || e === InputLength) {
37
+ return false; // step 1
38
+ }
39
+
40
+ var c = Input[e]; // step 2
41
+
42
+ var wordChars = WordCharacters(IgnoreCase, Unicode);
43
+
44
+ return $indexOf(wordChars, c) > -1; // steps 3-4
45
+ };
node_modules/es-abstract/2019/IterableToList.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var GetIterator = require('./GetIterator');
4
+ var IteratorStep = require('./IteratorStep');
5
+ var IteratorValue = require('./IteratorValue');
6
+
7
+ // https://262.ecma-international.org/8.0/#sec-iterabletolist
8
+
9
+ module.exports = function IterableToList(items, method) {
10
+ var iterator = GetIterator(items, method);
11
+ var values = [];
12
+ var next = true;
13
+ while (next) {
14
+ next = IteratorStep(iterator);
15
+ if (next) {
16
+ var nextValue = IteratorValue(next);
17
+ values[values.length] = nextValue;
18
+ }
19
+ }
20
+ return values;
21
+ };
node_modules/es-abstract/2019/IteratorClose.js ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+ var isObject = require('es-object-atoms/isObject');
5
+
6
+ var Call = require('./Call');
7
+ var CompletionRecord = require('./CompletionRecord');
8
+ var GetMethod = require('./GetMethod');
9
+ var IsCallable = require('./IsCallable');
10
+
11
+ // https://262.ecma-international.org/6.0/#sec-iteratorclose
12
+
13
+ module.exports = function IteratorClose(iterator, completion) {
14
+ if (!isObject(iterator)) {
15
+ throw new $TypeError('Assertion failed: Type(iterator) is not Object');
16
+ }
17
+ if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) {
18
+ throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance');
19
+ }
20
+ var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion;
21
+
22
+ var iteratorReturn = GetMethod(iterator, 'return');
23
+
24
+ if (typeof iteratorReturn === 'undefined') {
25
+ return completionThunk();
26
+ }
27
+
28
+ var completionRecord;
29
+ try {
30
+ var innerResult = Call(iteratorReturn, iterator, []);
31
+ } catch (e) {
32
+ // if we hit here, then "e" is the innerResult completion that needs re-throwing
33
+
34
+ // if the completion is of type "throw", this will throw.
35
+ completionThunk();
36
+ // eslint-disable-next-line no-useless-assignment
37
+ completionThunk = null; // ensure it's not called twice.
38
+
39
+ // if not, then return the innerResult completion
40
+ throw e;
41
+ }
42
+ completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does
43
+ // eslint-disable-next-line no-useless-assignment
44
+ completionThunk = null; // ensure it's not called twice.
45
+
46
+ if (!isObject(innerResult)) {
47
+ throw new $TypeError('iterator .return must return an object');
48
+ }
49
+
50
+ return completionRecord;
51
+ };
node_modules/es-abstract/2019/IteratorComplete.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+ var isObject = require('es-object-atoms/isObject');
5
+
6
+ var Get = require('./Get');
7
+ var ToBoolean = require('./ToBoolean');
8
+
9
+ // https://262.ecma-international.org/6.0/#sec-iteratorcomplete
10
+
11
+ module.exports = function IteratorComplete(iterResult) {
12
+ if (!isObject(iterResult)) {
13
+ throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
14
+ }
15
+ return ToBoolean(Get(iterResult, 'done'));
16
+ };
node_modules/es-abstract/2019/IteratorNext.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+ var isObject = require('es-object-atoms/isObject');
5
+
6
+ var Invoke = require('./Invoke');
7
+
8
+ // https://262.ecma-international.org/6.0/#sec-iteratornext
9
+
10
+ module.exports = function IteratorNext(iterator, value) {
11
+ var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]);
12
+ if (!isObject(result)) {
13
+ throw new $TypeError('iterator next must return an object');
14
+ }
15
+ return result;
16
+ };
node_modules/es-abstract/2019/IteratorStep.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var IteratorComplete = require('./IteratorComplete');
4
+ var IteratorNext = require('./IteratorNext');
5
+
6
+ // https://262.ecma-international.org/6.0/#sec-iteratorstep
7
+
8
+ module.exports = function IteratorStep(iterator) {
9
+ var result = IteratorNext(iterator);
10
+ var done = IteratorComplete(result);
11
+ return done === true ? false : result;
12
+ };
13
+
node_modules/es-abstract/2019/IteratorValue.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use strict';
2
+
3
+ var $TypeError = require('es-errors/type');
4
+ var isObject = require('es-object-atoms/isObject');
5
+
6
+ var Get = require('./Get');
7
+
8
+ // https://262.ecma-international.org/6.0/#sec-iteratorvalue
9
+
10
+ module.exports = function IteratorValue(iterResult) {
11
+ if (!isObject(iterResult)) {
12
+ throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
13
+ }
14
+ return Get(iterResult, 'value');
15
+ };
16
+