flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
37
VISUALIZACION/node_modules/es-abstract/2018/AbstractEqualityComparison.js
generated
vendored
Executable file
37
VISUALIZACION/node_modules/es-abstract/2018/AbstractEqualityComparison.js
generated
vendored
Executable file
|
|
@ -0,0 +1,37 @@
|
|||
'use strict';
|
||||
|
||||
var ToNumber = require('./ToNumber');
|
||||
var ToPrimitive = require('./ToPrimitive');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-abstract-equality-comparison
|
||||
|
||||
module.exports = function AbstractEqualityComparison(x, y) {
|
||||
var xType = Type(x);
|
||||
var yType = Type(y);
|
||||
if (xType === yType) {
|
||||
return x === y; // ES6+ specified this shortcut anyways.
|
||||
}
|
||||
if (x == null && y == null) {
|
||||
return true;
|
||||
}
|
||||
if (xType === 'Number' && yType === 'String') {
|
||||
return AbstractEqualityComparison(x, ToNumber(y));
|
||||
}
|
||||
if (xType === 'String' && yType === 'Number') {
|
||||
return AbstractEqualityComparison(ToNumber(x), y);
|
||||
}
|
||||
if (xType === 'Boolean') {
|
||||
return AbstractEqualityComparison(ToNumber(x), y);
|
||||
}
|
||||
if (yType === 'Boolean') {
|
||||
return AbstractEqualityComparison(x, ToNumber(y));
|
||||
}
|
||||
if ((xType === 'String' || xType === 'Number' || xType === 'Symbol') && yType === 'Object') {
|
||||
return AbstractEqualityComparison(x, ToPrimitive(y));
|
||||
}
|
||||
if (xType === 'Object' && (yType === 'String' || yType === 'Number' || yType === 'Symbol')) {
|
||||
return AbstractEqualityComparison(ToPrimitive(x), y);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
61
VISUALIZACION/node_modules/es-abstract/2018/AbstractRelationalComparison.js
generated
vendored
Executable file
61
VISUALIZACION/node_modules/es-abstract/2018/AbstractRelationalComparison.js
generated
vendored
Executable file
|
|
@ -0,0 +1,61 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $Number = GetIntrinsic('%Number%');
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var $isNaN = require('../helpers/isNaN');
|
||||
var $isFinite = require('../helpers/isFinite');
|
||||
|
||||
var IsStringPrefix = require('./IsStringPrefix');
|
||||
var ToNumber = require('./ToNumber');
|
||||
var ToPrimitive = require('./ToPrimitive');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/9.0/#sec-abstract-relational-comparison
|
||||
|
||||
module.exports = function AbstractRelationalComparison(x, y, LeftFirst) {
|
||||
if (Type(LeftFirst) !== 'Boolean') {
|
||||
throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean');
|
||||
}
|
||||
var px;
|
||||
var py;
|
||||
if (LeftFirst) {
|
||||
px = ToPrimitive(x, $Number);
|
||||
py = ToPrimitive(y, $Number);
|
||||
} else {
|
||||
py = ToPrimitive(y, $Number);
|
||||
px = ToPrimitive(x, $Number);
|
||||
}
|
||||
if (Type(px) === 'String' && Type(py) === 'String') {
|
||||
if (IsStringPrefix(py, px)) {
|
||||
return false;
|
||||
}
|
||||
if (IsStringPrefix(px, py)) {
|
||||
return true;
|
||||
}
|
||||
return px < py; // both strings, neither a prefix of the other. shortcut for steps 3 c-f
|
||||
}
|
||||
var nx = ToNumber(px);
|
||||
var ny = ToNumber(py);
|
||||
if ($isNaN(nx) || $isNaN(ny)) {
|
||||
return undefined;
|
||||
}
|
||||
if ($isFinite(nx) && $isFinite(ny) && nx === ny) {
|
||||
return false;
|
||||
}
|
||||
if (nx === Infinity) {
|
||||
return false;
|
||||
}
|
||||
if (ny === Infinity) {
|
||||
return true;
|
||||
}
|
||||
if (ny === -Infinity) {
|
||||
return false;
|
||||
}
|
||||
if (nx === -Infinity) {
|
||||
return true;
|
||||
}
|
||||
return nx < ny; // by now, these are both nonzero, finite, and not equal
|
||||
};
|
||||
47
VISUALIZACION/node_modules/es-abstract/2018/AdvanceStringIndex.js
generated
vendored
Executable file
47
VISUALIZACION/node_modules/es-abstract/2018/AdvanceStringIndex.js
generated
vendored
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var Type = require('./Type');
|
||||
|
||||
var isInteger = require('../helpers/isInteger');
|
||||
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
|
||||
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
|
||||
var MAX_SAFE_INTEGER = require('../helpers/maxSafeInteger');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var $charCodeAt = require('call-bind/callBound')('String.prototype.charCodeAt');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-advancestringindex
|
||||
|
||||
module.exports = function AdvanceStringIndex(S, index, unicode) {
|
||||
if (Type(S) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: `S` must be a String');
|
||||
}
|
||||
if (!isInteger(index) || index < 0 || index > MAX_SAFE_INTEGER) {
|
||||
throw new $TypeError('Assertion failed: `length` must be an integer >= 0 and <= 2**53');
|
||||
}
|
||||
if (Type(unicode) !== 'Boolean') {
|
||||
throw new $TypeError('Assertion failed: `unicode` must be a Boolean');
|
||||
}
|
||||
if (!unicode) {
|
||||
return index + 1;
|
||||
}
|
||||
var length = S.length;
|
||||
if ((index + 1) >= length) {
|
||||
return index + 1;
|
||||
}
|
||||
|
||||
var first = $charCodeAt(S, index);
|
||||
if (!isLeadingSurrogate(first)) {
|
||||
return index + 1;
|
||||
}
|
||||
|
||||
var second = $charCodeAt(S, index + 1);
|
||||
if (!isTrailingSurrogate(second)) {
|
||||
return index + 1;
|
||||
}
|
||||
|
||||
return index + 2;
|
||||
};
|
||||
54
VISUALIZACION/node_modules/es-abstract/2018/ArrayCreate.js
generated
vendored
Executable file
54
VISUALIZACION/node_modules/es-abstract/2018/ArrayCreate.js
generated
vendored
Executable file
|
|
@ -0,0 +1,54 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $ArrayPrototype = GetIntrinsic('%Array.prototype%');
|
||||
var $RangeError = GetIntrinsic('%RangeError%');
|
||||
var $SyntaxError = GetIntrinsic('%SyntaxError%');
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var isInteger = require('../helpers/isInteger');
|
||||
|
||||
var hasProto = require('has-proto')();
|
||||
|
||||
var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1;
|
||||
|
||||
var $setProto = GetIntrinsic('%Object.setPrototypeOf%', true) || (
|
||||
hasProto
|
||||
? function (O, proto) {
|
||||
O.__proto__ = proto; // eslint-disable-line no-proto, no-param-reassign
|
||||
return O;
|
||||
}
|
||||
: null
|
||||
);
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-arraycreate
|
||||
|
||||
module.exports = function ArrayCreate(length) {
|
||||
if (!isInteger(length) || length < 0) {
|
||||
throw new $TypeError('Assertion failed: `length` must be an integer Number >= 0');
|
||||
}
|
||||
if (length > MAX_ARRAY_LENGTH) {
|
||||
throw new $RangeError('length is greater than (2**32 - 1)');
|
||||
}
|
||||
var proto = arguments.length > 1 ? arguments[1] : $ArrayPrototype;
|
||||
var A = []; // steps 5 - 7, and 9
|
||||
if (proto !== $ArrayPrototype) { // step 8
|
||||
if (!$setProto) {
|
||||
throw new $SyntaxError('ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]');
|
||||
}
|
||||
$setProto(A, proto);
|
||||
}
|
||||
if (length !== 0) { // bypasses the need for step 2
|
||||
A.length = length;
|
||||
}
|
||||
/* step 10, the above as a shortcut for the below
|
||||
OrdinaryDefineOwnProperty(A, 'length', {
|
||||
'[[Configurable]]': false,
|
||||
'[[Enumerable]]': false,
|
||||
'[[Value]]': length,
|
||||
'[[Writable]]': true
|
||||
});
|
||||
*/
|
||||
return A;
|
||||
};
|
||||
85
VISUALIZACION/node_modules/es-abstract/2018/ArraySetLength.js
generated
vendored
Executable file
85
VISUALIZACION/node_modules/es-abstract/2018/ArraySetLength.js
generated
vendored
Executable file
|
|
@ -0,0 +1,85 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $RangeError = GetIntrinsic('%RangeError%');
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var assign = require('object.assign');
|
||||
|
||||
var isPropertyDescriptor = require('../helpers/isPropertyDescriptor');
|
||||
|
||||
var IsArray = require('./IsArray');
|
||||
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
|
||||
var IsDataDescriptor = require('./IsDataDescriptor');
|
||||
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
|
||||
var OrdinaryGetOwnProperty = require('./OrdinaryGetOwnProperty');
|
||||
var ToNumber = require('./ToNumber');
|
||||
var ToString = require('./ToString');
|
||||
var ToUint32 = require('./ToUint32');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-arraysetlength
|
||||
|
||||
// eslint-disable-next-line max-statements, max-lines-per-function
|
||||
module.exports = function ArraySetLength(A, Desc) {
|
||||
if (!IsArray(A)) {
|
||||
throw new $TypeError('Assertion failed: A must be an Array');
|
||||
}
|
||||
if (!isPropertyDescriptor({
|
||||
Type: Type,
|
||||
IsDataDescriptor: IsDataDescriptor,
|
||||
IsAccessorDescriptor: IsAccessorDescriptor
|
||||
}, Desc)) {
|
||||
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
|
||||
}
|
||||
if (!('[[Value]]' in Desc)) {
|
||||
return OrdinaryDefineOwnProperty(A, 'length', Desc);
|
||||
}
|
||||
var newLenDesc = assign({}, Desc);
|
||||
var newLen = ToUint32(Desc['[[Value]]']);
|
||||
var numberLen = ToNumber(Desc['[[Value]]']);
|
||||
if (newLen !== numberLen) {
|
||||
throw new $RangeError('Invalid array length');
|
||||
}
|
||||
newLenDesc['[[Value]]'] = newLen;
|
||||
var oldLenDesc = OrdinaryGetOwnProperty(A, 'length');
|
||||
if (!IsDataDescriptor(oldLenDesc)) {
|
||||
throw new $TypeError('Assertion failed: an array had a non-data descriptor on `length`');
|
||||
}
|
||||
var oldLen = oldLenDesc['[[Value]]'];
|
||||
if (newLen >= oldLen) {
|
||||
return OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
|
||||
}
|
||||
if (!oldLenDesc['[[Writable]]']) {
|
||||
return false;
|
||||
}
|
||||
var newWritable;
|
||||
if (!('[[Writable]]' in newLenDesc) || newLenDesc['[[Writable]]']) {
|
||||
newWritable = true;
|
||||
} else {
|
||||
newWritable = false;
|
||||
newLenDesc['[[Writable]]'] = true;
|
||||
}
|
||||
var succeeded = OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
|
||||
if (!succeeded) {
|
||||
return false;
|
||||
}
|
||||
while (newLen < oldLen) {
|
||||
oldLen -= 1;
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
var deleteSucceeded = delete A[ToString(oldLen)];
|
||||
if (!deleteSucceeded) {
|
||||
newLenDesc['[[Value]]'] = oldLen + 1;
|
||||
if (!newWritable) {
|
||||
newLenDesc['[[Writable]]'] = false;
|
||||
OrdinaryDefineOwnProperty(A, 'length', newLenDesc);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!newWritable) {
|
||||
return OrdinaryDefineOwnProperty(A, 'length', { '[[Writable]]': false });
|
||||
}
|
||||
return true;
|
||||
};
|
||||
47
VISUALIZACION/node_modules/es-abstract/2018/ArraySpeciesCreate.js
generated
vendored
Executable file
47
VISUALIZACION/node_modules/es-abstract/2018/ArraySpeciesCreate.js
generated
vendored
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $Array = GetIntrinsic('%Array%');
|
||||
var $species = GetIntrinsic('%Symbol.species%', true);
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var Get = require('./Get');
|
||||
var IsArray = require('./IsArray');
|
||||
var IsConstructor = require('./IsConstructor');
|
||||
var Type = require('./Type');
|
||||
|
||||
var isInteger = require('../helpers/isInteger');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-arrayspeciescreate
|
||||
|
||||
module.exports = function ArraySpeciesCreate(originalArray, length) {
|
||||
if (!isInteger(length) || length < 0) {
|
||||
throw new $TypeError('Assertion failed: length must be an integer >= 0');
|
||||
}
|
||||
var len = length === 0 ? 0 : length;
|
||||
var C;
|
||||
var isArray = IsArray(originalArray);
|
||||
if (isArray) {
|
||||
C = Get(originalArray, 'constructor');
|
||||
// TODO: figure out how to make a cross-realm normal Array, a same-realm Array
|
||||
// if (IsConstructor(C)) {
|
||||
// if C is another realm's Array, C = undefined
|
||||
// Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(Array))) === null ?
|
||||
// }
|
||||
if ($species && Type(C) === 'Object') {
|
||||
C = Get(C, $species);
|
||||
if (C === null) {
|
||||
C = void 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (typeof C === 'undefined') {
|
||||
return $Array(len);
|
||||
}
|
||||
if (!IsConstructor(C)) {
|
||||
throw new $TypeError('C must be a constructor');
|
||||
}
|
||||
return new C(len); // Construct(C, len);
|
||||
};
|
||||
|
||||
62
VISUALIZACION/node_modules/es-abstract/2018/AsyncIteratorClose.js
generated
vendored
Executable file
62
VISUALIZACION/node_modules/es-abstract/2018/AsyncIteratorClose.js
generated
vendored
Executable file
|
|
@ -0,0 +1,62 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $SyntaxError = GetIntrinsic('%SyntaxError%');
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
var $Promise = GetIntrinsic('%Promise%', true);
|
||||
|
||||
var Call = require('./Call');
|
||||
var CompletionRecord = require('./CompletionRecord');
|
||||
var GetMethod = require('./GetMethod');
|
||||
var Type = require('./Type');
|
||||
|
||||
var assertRecord = require('../helpers/assertRecord');
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $then = callBound('Promise.prototype.then', true);
|
||||
|
||||
// https://262.ecma-international.org/9.0/#sec-asynciteratorclose
|
||||
|
||||
module.exports = function AsyncIteratorClose(iteratorRecord, completion) {
|
||||
assertRecord(Type, 'Iterator Record', 'iteratorRecord', iteratorRecord); // step 1
|
||||
|
||||
if (!(completion instanceof CompletionRecord)) {
|
||||
throw new $TypeError('Assertion failed: completion is not a Completion Record instance'); // step 2
|
||||
}
|
||||
|
||||
if (!$then) {
|
||||
throw new $SyntaxError('This environment does not support Promises.');
|
||||
}
|
||||
|
||||
var iterator = iteratorRecord['[[Iterator]]']; // step 3
|
||||
|
||||
return new $Promise(function (resolve) {
|
||||
var ret = GetMethod(iterator, 'return'); // step 4
|
||||
|
||||
if (typeof ret === 'undefined') {
|
||||
resolve(completion); // step 5
|
||||
} else {
|
||||
resolve($then(
|
||||
new $Promise(function (resolve2) {
|
||||
// process.exit(42);
|
||||
resolve2(Call(ret, iterator, [])); // step 6
|
||||
}),
|
||||
function (innerResult) {
|
||||
if (Type(innerResult) !== 'Object') {
|
||||
throw new $TypeError('`innerResult` must be an Object'); // step 10
|
||||
}
|
||||
return completion;
|
||||
},
|
||||
function (e) {
|
||||
if (completion.type() === 'throw') {
|
||||
completion['?'](); // step 8
|
||||
} else {
|
||||
throw e; // step 9
|
||||
}
|
||||
}
|
||||
));
|
||||
}
|
||||
});
|
||||
};
|
||||
20
VISUALIZACION/node_modules/es-abstract/2018/Call.js
generated
vendored
Executable file
20
VISUALIZACION/node_modules/es-abstract/2018/Call.js
generated
vendored
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var IsArray = require('./IsArray');
|
||||
|
||||
var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-call
|
||||
|
||||
module.exports = function Call(F, V) {
|
||||
var argumentsList = arguments.length > 2 ? arguments[2] : [];
|
||||
if (!IsArray(argumentsList)) {
|
||||
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
|
||||
}
|
||||
return $apply(F, V, argumentsList);
|
||||
};
|
||||
22
VISUALIZACION/node_modules/es-abstract/2018/CanonicalNumericIndexString.js
generated
vendored
Executable file
22
VISUALIZACION/node_modules/es-abstract/2018/CanonicalNumericIndexString.js
generated
vendored
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var SameValue = require('./SameValue');
|
||||
var ToNumber = require('./ToNumber');
|
||||
var ToString = require('./ToString');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring
|
||||
|
||||
module.exports = function CanonicalNumericIndexString(argument) {
|
||||
if (Type(argument) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: `argument` must be a String');
|
||||
}
|
||||
if (argument === '-0') { return -0; }
|
||||
var n = ToNumber(argument);
|
||||
if (SameValue(ToString(n), argument)) { return n; }
|
||||
return void 0;
|
||||
};
|
||||
55
VISUALIZACION/node_modules/es-abstract/2018/Canonicalize.js
generated
vendored
Executable file
55
VISUALIZACION/node_modules/es-abstract/2018/Canonicalize.js
generated
vendored
Executable file
|
|
@ -0,0 +1,55 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
var has = require('has');
|
||||
|
||||
var $charCodeAt = callBound('String.prototype.charCodeAt');
|
||||
var $toUpperCase = callBound('String.prototype.toUpperCase');
|
||||
|
||||
var Type = require('./Type');
|
||||
|
||||
var caseFolding = require('../helpers/caseFolding');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch
|
||||
|
||||
module.exports = function Canonicalize(ch, IgnoreCase, Unicode) {
|
||||
if (Type(ch) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: `ch` must be a character');
|
||||
}
|
||||
|
||||
if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') {
|
||||
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be Booleans');
|
||||
}
|
||||
|
||||
if (!IgnoreCase) {
|
||||
return ch; // step 1
|
||||
}
|
||||
|
||||
if (Unicode) { // step 2
|
||||
if (has(caseFolding.C, ch)) {
|
||||
return caseFolding.C[ch];
|
||||
}
|
||||
if (has(caseFolding.S, ch)) {
|
||||
return caseFolding.S[ch];
|
||||
}
|
||||
return ch; // step 2.b
|
||||
}
|
||||
|
||||
var u = $toUpperCase(ch); // step 2
|
||||
|
||||
if (u.length !== 1) {
|
||||
return ch; // step 3
|
||||
}
|
||||
|
||||
var cu = u; // step 4
|
||||
|
||||
if ($charCodeAt(ch, 0) >= 128 && $charCodeAt(cu, 0) < 128) {
|
||||
return ch; // step 5
|
||||
}
|
||||
|
||||
return cu;
|
||||
};
|
||||
31
VISUALIZACION/node_modules/es-abstract/2018/CharacterRange.js
generated
vendored
Executable file
31
VISUALIZACION/node_modules/es-abstract/2018/CharacterRange.js
generated
vendored
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
var $charCodeAt = callBound('String.prototype.charCodeAt');
|
||||
var $push = callBound('Array.prototype.push');
|
||||
|
||||
module.exports = function CharacterRange(A, B) {
|
||||
if (A.length !== 1 || B.length !== 1) {
|
||||
throw new $TypeError('Assertion failed: CharSets A and B contain exactly one character');
|
||||
}
|
||||
|
||||
var a = A[0];
|
||||
var b = B[0];
|
||||
|
||||
var i = $charCodeAt(a, 0);
|
||||
var j = $charCodeAt(b, 0);
|
||||
|
||||
if (!(i <= j)) {
|
||||
throw new $TypeError('Assertion failed: i is not <= j');
|
||||
}
|
||||
|
||||
var arr = [];
|
||||
for (var k = i; k <= j; k += 1) {
|
||||
$push(arr, $fromCharCode(k));
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
39
VISUALIZACION/node_modules/es-abstract/2018/CompletePropertyDescriptor.js
generated
vendored
Executable file
39
VISUALIZACION/node_modules/es-abstract/2018/CompletePropertyDescriptor.js
generated
vendored
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
'use strict';
|
||||
|
||||
var has = require('has');
|
||||
|
||||
var assertRecord = require('../helpers/assertRecord');
|
||||
|
||||
var IsDataDescriptor = require('./IsDataDescriptor');
|
||||
var IsGenericDescriptor = require('./IsGenericDescriptor');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-completepropertydescriptor
|
||||
|
||||
module.exports = function CompletePropertyDescriptor(Desc) {
|
||||
/* eslint no-param-reassign: 0 */
|
||||
assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
|
||||
|
||||
if (IsGenericDescriptor(Desc) || IsDataDescriptor(Desc)) {
|
||||
if (!has(Desc, '[[Value]]')) {
|
||||
Desc['[[Value]]'] = void 0;
|
||||
}
|
||||
if (!has(Desc, '[[Writable]]')) {
|
||||
Desc['[[Writable]]'] = false;
|
||||
}
|
||||
} else {
|
||||
if (!has(Desc, '[[Get]]')) {
|
||||
Desc['[[Get]]'] = void 0;
|
||||
}
|
||||
if (!has(Desc, '[[Set]]')) {
|
||||
Desc['[[Set]]'] = void 0;
|
||||
}
|
||||
}
|
||||
if (!has(Desc, '[[Enumerable]]')) {
|
||||
Desc['[[Enumerable]]'] = false;
|
||||
}
|
||||
if (!has(Desc, '[[Configurable]]')) {
|
||||
Desc['[[Configurable]]'] = false;
|
||||
}
|
||||
return Desc;
|
||||
};
|
||||
53
VISUALIZACION/node_modules/es-abstract/2018/CompletionRecord.js
generated
vendored
Executable file
53
VISUALIZACION/node_modules/es-abstract/2018/CompletionRecord.js
generated
vendored
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $SyntaxError = GetIntrinsic('%SyntaxError%');
|
||||
|
||||
var SLOT = require('internal-slot');
|
||||
|
||||
// https://262.ecma-international.org/7.0/#sec-completion-record-specification-type
|
||||
|
||||
var CompletionRecord = function CompletionRecord(type, value) {
|
||||
if (!(this instanceof CompletionRecord)) {
|
||||
return new CompletionRecord(type, value);
|
||||
}
|
||||
if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') {
|
||||
throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"');
|
||||
}
|
||||
SLOT.set(this, '[[Type]]', type);
|
||||
SLOT.set(this, '[[Value]]', value);
|
||||
// [[Target]] slot?
|
||||
};
|
||||
|
||||
CompletionRecord.prototype.type = function Type() {
|
||||
return SLOT.get(this, '[[Type]]');
|
||||
};
|
||||
|
||||
CompletionRecord.prototype.value = function Value() {
|
||||
return SLOT.get(this, '[[Value]]');
|
||||
};
|
||||
|
||||
CompletionRecord.prototype['?'] = function ReturnIfAbrupt() {
|
||||
var type = SLOT.get(this, '[[Type]]');
|
||||
var value = SLOT.get(this, '[[Value]]');
|
||||
|
||||
if (type === 'normal') {
|
||||
return value;
|
||||
}
|
||||
if (type === 'throw') {
|
||||
throw value;
|
||||
}
|
||||
throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported');
|
||||
};
|
||||
|
||||
CompletionRecord.prototype['!'] = function assert() {
|
||||
var type = SLOT.get(this, '[[Type]]');
|
||||
|
||||
if (type !== 'normal') {
|
||||
throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"');
|
||||
}
|
||||
return SLOT.get(this, '[[Value]]');
|
||||
};
|
||||
|
||||
module.exports = CompletionRecord;
|
||||
68
VISUALIZACION/node_modules/es-abstract/2018/CopyDataProperties.js
generated
vendored
Executable file
68
VISUALIZACION/node_modules/es-abstract/2018/CopyDataProperties.js
generated
vendored
Executable file
|
|
@ -0,0 +1,68 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
var forEach = require('../helpers/forEach');
|
||||
var OwnPropertyKeys = require('../helpers/OwnPropertyKeys');
|
||||
|
||||
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
|
||||
|
||||
var CreateDataProperty = require('./CreateDataProperty');
|
||||
var Get = require('./Get');
|
||||
var IsArray = require('./IsArray');
|
||||
var IsInteger = require('./IsInteger');
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
var SameValue = require('./SameValue');
|
||||
var ToNumber = require('./ToNumber');
|
||||
var ToObject = require('./ToObject');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/9.0/#sec-copydataproperties
|
||||
|
||||
module.exports = function CopyDataProperties(target, source, excludedItems) {
|
||||
if (Type(target) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: "target" must be an Object');
|
||||
}
|
||||
|
||||
if (!IsArray(excludedItems)) {
|
||||
throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys');
|
||||
}
|
||||
for (var i = 0; i < excludedItems.length; i += 1) {
|
||||
if (!IsPropertyKey(excludedItems[i])) {
|
||||
throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys');
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof source === 'undefined' || source === null) {
|
||||
return target;
|
||||
}
|
||||
|
||||
var fromObj = ToObject(source);
|
||||
|
||||
var sourceKeys = OwnPropertyKeys(fromObj);
|
||||
forEach(sourceKeys, function (nextKey) {
|
||||
var excluded = false;
|
||||
|
||||
forEach(excludedItems, function (e) {
|
||||
if (SameValue(e, nextKey) === true) {
|
||||
excluded = true;
|
||||
}
|
||||
});
|
||||
|
||||
var enumerable = $isEnumerable(fromObj, nextKey) || (
|
||||
// this is to handle string keys being non-enumerable in older engines
|
||||
typeof source === 'string'
|
||||
&& nextKey >= 0
|
||||
&& IsInteger(ToNumber(nextKey))
|
||||
);
|
||||
if (excluded === false && enumerable) {
|
||||
var propValue = Get(fromObj, nextKey);
|
||||
CreateDataProperty(target, nextKey, propValue);
|
||||
}
|
||||
});
|
||||
|
||||
return target;
|
||||
};
|
||||
155
VISUALIZACION/node_modules/es-abstract/2018/CreateAsyncFromSyncIterator.js
generated
vendored
Executable file
155
VISUALIZACION/node_modules/es-abstract/2018/CreateAsyncFromSyncIterator.js
generated
vendored
Executable file
|
|
@ -0,0 +1,155 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $SyntaxError = GetIntrinsic('%SyntaxError%');
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
var $Promise = GetIntrinsic('%Promise%', true);
|
||||
|
||||
var Call = require('./Call');
|
||||
var CreateIterResultObject = require('./CreateIterResultObject');
|
||||
var Get = require('./Get');
|
||||
var GetMethod = require('./GetMethod');
|
||||
var IteratorComplete = require('./IteratorComplete');
|
||||
var IteratorNext = require('./IteratorNext');
|
||||
var IteratorValue = require('./IteratorValue');
|
||||
var ObjectCreate = require('./ObjectCreate');
|
||||
var PromiseResolve = require('./PromiseResolve');
|
||||
var Type = require('./Type');
|
||||
|
||||
var SLOT = require('internal-slot');
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $then = callBound('Promise.prototype.then', true);
|
||||
|
||||
var assertRecord = require('../helpers/assertRecord');
|
||||
|
||||
var AsyncFromSyncIteratorContinuation = function AsyncFromSyncIteratorContinuation(result) {
|
||||
if (Type(result) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
||||
}
|
||||
|
||||
if (arguments.length > 1) {
|
||||
throw new $TypeError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation');
|
||||
}
|
||||
|
||||
if (!$Promise) {
|
||||
throw new $SyntaxError('This environment does not support Promises.');
|
||||
}
|
||||
|
||||
return new Promise(function (resolve) {
|
||||
var done = IteratorComplete(result); // step 2
|
||||
var value = IteratorValue(result); // step 4
|
||||
var valueWrapper = PromiseResolve($Promise, value); // step 6
|
||||
|
||||
// eslint-disable-next-line no-shadow
|
||||
var onFulfilled = function (value) { // steps 8-9
|
||||
return CreateIterResultObject(value, done); // step 8.a
|
||||
};
|
||||
resolve($then(valueWrapper, onFulfilled)); // step 11
|
||||
}); // step 12
|
||||
};
|
||||
|
||||
var $AsyncFromSyncIteratorPrototype = GetIntrinsic('%AsyncFromSyncIteratorPrototype%', true) || {
|
||||
next: function next(value) {
|
||||
var O = this; // step 1
|
||||
|
||||
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
|
||||
|
||||
var argsLength = arguments.length;
|
||||
|
||||
return new Promise(function (resolve) { // step 3
|
||||
var syncIteratorRecord = SLOT.get(O, '[[SyncIteratorRecord]]'); // step 4
|
||||
var result;
|
||||
if (argsLength > 0) {
|
||||
result = IteratorNext(syncIteratorRecord['[[Iterator]]'], value); // step 5.a
|
||||
} else { // step 6
|
||||
result = IteratorNext(syncIteratorRecord['[[Iterator]]']);// step 6.a
|
||||
}
|
||||
resolve(AsyncFromSyncIteratorContinuation(result)); // step 8
|
||||
});
|
||||
},
|
||||
'return': function () {
|
||||
var O = this; // step 1
|
||||
|
||||
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
|
||||
|
||||
var valueIsPresent = arguments.length > 0;
|
||||
var value = valueIsPresent ? arguments[0] : void undefined;
|
||||
|
||||
return new Promise(function (resolve, reject) { // step 3
|
||||
var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
|
||||
var iteratorReturn = GetMethod(syncIterator, 'return'); // step 5
|
||||
|
||||
if (typeof iteratorReturn === 'undefined') { // step 7
|
||||
var iterResult = CreateIterResultObject(value, true); // step 7.a
|
||||
Call(resolve, undefined, [iterResult]); // step 7.b
|
||||
return;
|
||||
}
|
||||
var result;
|
||||
if (valueIsPresent) { // step 8
|
||||
result = Call(iteratorReturn, syncIterator, [value]); // step 8.a
|
||||
} else { // step 9
|
||||
result = Call(iteratorReturn, syncIterator); // step 9.a
|
||||
}
|
||||
if (Type(result) !== 'Object') { // step 11
|
||||
Call(reject, undefined, [new $TypeError('Iterator `return` method returned a non-object value.')]); // step 11.a
|
||||
return;
|
||||
}
|
||||
|
||||
resolve(AsyncFromSyncIteratorContinuation(result)); // step 12
|
||||
});
|
||||
},
|
||||
'throw': function () {
|
||||
var O = this; // step 1
|
||||
|
||||
SLOT.assert(O, '[[SyncIteratorRecord]]'); // step 2
|
||||
|
||||
var valueIsPresent = arguments.length > 0;
|
||||
var value = valueIsPresent ? arguments[0] : void undefined;
|
||||
|
||||
return new Promise(function (resolve, reject) { // step 3
|
||||
var syncIterator = SLOT.get(O, '[[SyncIteratorRecord]]')['[[Iterator]]']; // step 4
|
||||
|
||||
var throwMethod = GetMethod(syncIterator, 'throw'); // step 5
|
||||
|
||||
if (typeof throwMethod === 'undefined') { // step 7
|
||||
Call(reject, undefined, [value]); // step 7.a
|
||||
return;
|
||||
}
|
||||
|
||||
var result;
|
||||
if (valueIsPresent) { // step 8
|
||||
result = Call(throwMethod, syncIterator, [value]); // step 8.a
|
||||
} else { // step 9
|
||||
result = Call(throwMethod, syncIterator); // step 9.a
|
||||
}
|
||||
if (Type(result) !== 'Object') { // step 11
|
||||
Call(reject, undefined, [new $TypeError('Iterator `throw` method returned a non-object value.')]); // step 11.a
|
||||
return;
|
||||
}
|
||||
|
||||
resolve(AsyncFromSyncIteratorContinuation(result/* , promiseCapability */)); // step 12
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// https://262.ecma-international.org/9.0/#sec-createasyncfromsynciterator
|
||||
|
||||
module.exports = function CreateAsyncFromSyncIterator(syncIteratorRecord) {
|
||||
assertRecord(Type, 'Iterator Record', 'syncIteratorRecord', syncIteratorRecord);
|
||||
|
||||
// var asyncIterator = ObjectCreate(%AsyncFromSyncIteratorPrototype%, « [[SyncIteratorRecord]] »); // step 1
|
||||
var asyncIterator = ObjectCreate($AsyncFromSyncIteratorPrototype);
|
||||
|
||||
SLOT.set(asyncIterator, '[[SyncIteratorRecord]]', syncIteratorRecord); // step 2
|
||||
|
||||
var nextMethod = Get(asyncIterator, 'next'); // step 3
|
||||
|
||||
return { // steps 3-4
|
||||
'[[Iterator]]': asyncIterator,
|
||||
'[[NextMethod]]': nextMethod,
|
||||
'[[Done]]': false
|
||||
};
|
||||
};
|
||||
27
VISUALIZACION/node_modules/es-abstract/2018/CreateDataProperty.js
generated
vendored
Executable file
27
VISUALIZACION/node_modules/es-abstract/2018/CreateDataProperty.js
generated
vendored
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
var OrdinaryDefineOwnProperty = require('./OrdinaryDefineOwnProperty');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-createdataproperty
|
||||
|
||||
module.exports = function CreateDataProperty(O, P, V) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
||||
}
|
||||
if (!IsPropertyKey(P)) {
|
||||
throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true');
|
||||
}
|
||||
var newDesc = {
|
||||
'[[Configurable]]': true,
|
||||
'[[Enumerable]]': true,
|
||||
'[[Value]]': V,
|
||||
'[[Writable]]': true
|
||||
};
|
||||
return OrdinaryDefineOwnProperty(O, P, newDesc);
|
||||
};
|
||||
25
VISUALIZACION/node_modules/es-abstract/2018/CreateDataPropertyOrThrow.js
generated
vendored
Executable file
25
VISUALIZACION/node_modules/es-abstract/2018/CreateDataPropertyOrThrow.js
generated
vendored
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var CreateDataProperty = require('./CreateDataProperty');
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
var Type = require('./Type');
|
||||
|
||||
// // https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow
|
||||
|
||||
module.exports = function CreateDataPropertyOrThrow(O, P, V) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
||||
}
|
||||
if (!IsPropertyKey(P)) {
|
||||
throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true');
|
||||
}
|
||||
var success = CreateDataProperty(O, P, V);
|
||||
if (!success) {
|
||||
throw new $TypeError('unable to create data property');
|
||||
}
|
||||
return success;
|
||||
};
|
||||
30
VISUALIZACION/node_modules/es-abstract/2018/CreateHTML.js
generated
vendored
Executable file
30
VISUALIZACION/node_modules/es-abstract/2018/CreateHTML.js
generated
vendored
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $replace = callBound('String.prototype.replace');
|
||||
|
||||
var RequireObjectCoercible = require('./RequireObjectCoercible');
|
||||
var ToString = require('./ToString');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-createhtml
|
||||
|
||||
module.exports = function CreateHTML(string, tag, attribute, value) {
|
||||
if (Type(tag) !== 'String' || Type(attribute) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: `tag` and `attribute` must be strings');
|
||||
}
|
||||
var str = RequireObjectCoercible(string);
|
||||
var S = ToString(str);
|
||||
var p1 = '<' + tag;
|
||||
if (attribute !== '') {
|
||||
var V = ToString(value);
|
||||
var escapedV = $replace(V, /\x22/g, '"');
|
||||
p1 += '\x20' + attribute + '\x3D\x22' + escapedV + '\x22';
|
||||
}
|
||||
return p1 + '>' + S + '</' + tag + '>';
|
||||
};
|
||||
19
VISUALIZACION/node_modules/es-abstract/2018/CreateIterResultObject.js
generated
vendored
Executable file
19
VISUALIZACION/node_modules/es-abstract/2018/CreateIterResultObject.js
generated
vendored
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-createiterresultobject
|
||||
|
||||
module.exports = function CreateIterResultObject(value, done) {
|
||||
if (Type(done) !== 'Boolean') {
|
||||
throw new $TypeError('Assertion failed: Type(done) is not Boolean');
|
||||
}
|
||||
return {
|
||||
value: value,
|
||||
done: done
|
||||
};
|
||||
};
|
||||
45
VISUALIZACION/node_modules/es-abstract/2018/CreateListFromArrayLike.js
generated
vendored
Executable file
45
VISUALIZACION/node_modules/es-abstract/2018/CreateListFromArrayLike.js
generated
vendored
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
var $indexOf = callBound('Array.prototype.indexOf', true) || callBound('String.prototype.indexOf');
|
||||
var $push = callBound('Array.prototype.push');
|
||||
|
||||
var Get = require('./Get');
|
||||
var IsArray = require('./IsArray');
|
||||
var ToLength = require('./ToLength');
|
||||
var ToString = require('./ToString');
|
||||
var Type = require('./Type');
|
||||
|
||||
var defaultElementTypes = ['Undefined', 'Null', 'Boolean', 'String', 'Symbol', 'Number', 'Object'];
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-createlistfromarraylike
|
||||
module.exports = function CreateListFromArrayLike(obj) {
|
||||
var elementTypes = arguments.length > 1
|
||||
? arguments[1]
|
||||
: defaultElementTypes;
|
||||
|
||||
if (Type(obj) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: `obj` must be an Object');
|
||||
}
|
||||
if (!IsArray(elementTypes)) {
|
||||
throw new $TypeError('Assertion failed: `elementTypes`, if provided, must be an array');
|
||||
}
|
||||
var len = ToLength(Get(obj, 'length'));
|
||||
var list = [];
|
||||
var index = 0;
|
||||
while (index < len) {
|
||||
var indexName = ToString(index);
|
||||
var next = Get(obj, indexName);
|
||||
var nextType = Type(next);
|
||||
if ($indexOf(elementTypes, nextType) < 0) {
|
||||
throw new $TypeError('item type ' + nextType + ' is not a valid elementType');
|
||||
}
|
||||
$push(list, next);
|
||||
index += 1;
|
||||
}
|
||||
return list;
|
||||
};
|
||||
40
VISUALIZACION/node_modules/es-abstract/2018/CreateMethodProperty.js
generated
vendored
Executable file
40
VISUALIZACION/node_modules/es-abstract/2018/CreateMethodProperty.js
generated
vendored
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
|
||||
|
||||
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
|
||||
var IsDataDescriptor = require('./IsDataDescriptor');
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
var SameValue = require('./SameValue');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-createmethodproperty
|
||||
|
||||
module.exports = function CreateMethodProperty(O, P, V) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
||||
}
|
||||
|
||||
if (!IsPropertyKey(P)) {
|
||||
throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true');
|
||||
}
|
||||
|
||||
var newDesc = {
|
||||
'[[Configurable]]': true,
|
||||
'[[Enumerable]]': false,
|
||||
'[[Value]]': V,
|
||||
'[[Writable]]': true
|
||||
};
|
||||
return DefineOwnProperty(
|
||||
IsDataDescriptor,
|
||||
SameValue,
|
||||
FromPropertyDescriptor,
|
||||
O,
|
||||
P,
|
||||
newDesc
|
||||
);
|
||||
};
|
||||
54
VISUALIZACION/node_modules/es-abstract/2018/DateFromTime.js
generated
vendored
Executable file
54
VISUALIZACION/node_modules/es-abstract/2018/DateFromTime.js
generated
vendored
Executable file
|
|
@ -0,0 +1,54 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $EvalError = GetIntrinsic('%EvalError%');
|
||||
|
||||
var DayWithinYear = require('./DayWithinYear');
|
||||
var InLeapYear = require('./InLeapYear');
|
||||
var MonthFromTime = require('./MonthFromTime');
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-15.9.1.5
|
||||
|
||||
module.exports = function DateFromTime(t) {
|
||||
var m = MonthFromTime(t);
|
||||
var d = DayWithinYear(t);
|
||||
if (m === 0) {
|
||||
return d + 1;
|
||||
}
|
||||
if (m === 1) {
|
||||
return d - 30;
|
||||
}
|
||||
var leap = InLeapYear(t);
|
||||
if (m === 2) {
|
||||
return d - 58 - leap;
|
||||
}
|
||||
if (m === 3) {
|
||||
return d - 89 - leap;
|
||||
}
|
||||
if (m === 4) {
|
||||
return d - 119 - leap;
|
||||
}
|
||||
if (m === 5) {
|
||||
return d - 150 - leap;
|
||||
}
|
||||
if (m === 6) {
|
||||
return d - 180 - leap;
|
||||
}
|
||||
if (m === 7) {
|
||||
return d - 211 - leap;
|
||||
}
|
||||
if (m === 8) {
|
||||
return d - 242 - leap;
|
||||
}
|
||||
if (m === 9) {
|
||||
return d - 272 - leap;
|
||||
}
|
||||
if (m === 10) {
|
||||
return d - 303 - leap;
|
||||
}
|
||||
if (m === 11) {
|
||||
return d - 333 - leap;
|
||||
}
|
||||
throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m);
|
||||
};
|
||||
30
VISUALIZACION/node_modules/es-abstract/2018/DateString.js
generated
vendored
Executable file
30
VISUALIZACION/node_modules/es-abstract/2018/DateString.js
generated
vendored
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var weekdays = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
|
||||
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
||||
|
||||
var $isNaN = require('../helpers/isNaN');
|
||||
var padTimeComponent = require('../helpers/padTimeComponent');
|
||||
|
||||
var Type = require('./Type');
|
||||
var WeekDay = require('./WeekDay');
|
||||
var MonthFromTime = require('./MonthFromTime');
|
||||
var YearFromTime = require('./YearFromTime');
|
||||
var DateFromTime = require('./DateFromTime');
|
||||
|
||||
// https://262.ecma-international.org/9.0/#sec-datestring
|
||||
|
||||
module.exports = function DateString(tv) {
|
||||
if (Type(tv) !== 'Number' || $isNaN(tv)) {
|
||||
throw new $TypeError('Assertion failed: `tv` must be a non-NaN Number');
|
||||
}
|
||||
var weekday = weekdays[WeekDay(tv)];
|
||||
var month = months[MonthFromTime(tv)];
|
||||
var day = padTimeComponent(DateFromTime(tv));
|
||||
var year = padTimeComponent(YearFromTime(tv), 4);
|
||||
return weekday + '\x20' + month + '\x20' + day + '\x20' + year;
|
||||
};
|
||||
11
VISUALIZACION/node_modules/es-abstract/2018/Day.js
generated
vendored
Executable file
11
VISUALIZACION/node_modules/es-abstract/2018/Day.js
generated
vendored
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
'use strict';
|
||||
|
||||
var floor = require('./floor');
|
||||
|
||||
var msPerDay = require('../helpers/timeConstants').msPerDay;
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-15.9.1.2
|
||||
|
||||
module.exports = function Day(t) {
|
||||
return floor(t / msPerDay);
|
||||
};
|
||||
10
VISUALIZACION/node_modules/es-abstract/2018/DayFromYear.js
generated
vendored
Executable file
10
VISUALIZACION/node_modules/es-abstract/2018/DayFromYear.js
generated
vendored
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
var floor = require('./floor');
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
|
||||
|
||||
module.exports = function DayFromYear(y) {
|
||||
return (365 * (y - 1970)) + floor((y - 1969) / 4) - floor((y - 1901) / 100) + floor((y - 1601) / 400);
|
||||
};
|
||||
|
||||
11
VISUALIZACION/node_modules/es-abstract/2018/DayWithinYear.js
generated
vendored
Executable file
11
VISUALIZACION/node_modules/es-abstract/2018/DayWithinYear.js
generated
vendored
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
'use strict';
|
||||
|
||||
var Day = require('./Day');
|
||||
var DayFromYear = require('./DayFromYear');
|
||||
var YearFromTime = require('./YearFromTime');
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
|
||||
|
||||
module.exports = function DayWithinYear(t) {
|
||||
return Day(t) - DayFromYear(YearFromTime(t));
|
||||
};
|
||||
18
VISUALIZACION/node_modules/es-abstract/2018/DaysInYear.js
generated
vendored
Executable file
18
VISUALIZACION/node_modules/es-abstract/2018/DaysInYear.js
generated
vendored
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
'use strict';
|
||||
|
||||
var modulo = require('./modulo');
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
|
||||
|
||||
module.exports = function DaysInYear(y) {
|
||||
if (modulo(y, 4) !== 0) {
|
||||
return 365;
|
||||
}
|
||||
if (modulo(y, 100) !== 0) {
|
||||
return 366;
|
||||
}
|
||||
if (modulo(y, 400) !== 0) {
|
||||
return 365;
|
||||
}
|
||||
return 366;
|
||||
};
|
||||
50
VISUALIZACION/node_modules/es-abstract/2018/DefinePropertyOrThrow.js
generated
vendored
Executable file
50
VISUALIZACION/node_modules/es-abstract/2018/DefinePropertyOrThrow.js
generated
vendored
Executable file
|
|
@ -0,0 +1,50 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var isPropertyDescriptor = require('../helpers/isPropertyDescriptor');
|
||||
var DefineOwnProperty = require('../helpers/DefineOwnProperty');
|
||||
|
||||
var FromPropertyDescriptor = require('./FromPropertyDescriptor');
|
||||
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
|
||||
var IsDataDescriptor = require('./IsDataDescriptor');
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
var SameValue = require('./SameValue');
|
||||
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-definepropertyorthrow
|
||||
|
||||
module.exports = function DefinePropertyOrThrow(O, P, desc) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
||||
}
|
||||
|
||||
if (!IsPropertyKey(P)) {
|
||||
throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true');
|
||||
}
|
||||
|
||||
var Desc = isPropertyDescriptor({
|
||||
Type: Type,
|
||||
IsDataDescriptor: IsDataDescriptor,
|
||||
IsAccessorDescriptor: IsAccessorDescriptor
|
||||
}, desc) ? desc : ToPropertyDescriptor(desc);
|
||||
if (!isPropertyDescriptor({
|
||||
Type: Type,
|
||||
IsDataDescriptor: IsDataDescriptor,
|
||||
IsAccessorDescriptor: IsAccessorDescriptor
|
||||
}, Desc)) {
|
||||
throw new $TypeError('Assertion failed: Desc is not a valid Property Descriptor');
|
||||
}
|
||||
|
||||
return DefineOwnProperty(
|
||||
IsDataDescriptor,
|
||||
SameValue,
|
||||
FromPropertyDescriptor,
|
||||
O,
|
||||
P,
|
||||
Desc
|
||||
);
|
||||
};
|
||||
27
VISUALIZACION/node_modules/es-abstract/2018/DeletePropertyOrThrow.js
generated
vendored
Executable file
27
VISUALIZACION/node_modules/es-abstract/2018/DeletePropertyOrThrow.js
generated
vendored
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow
|
||||
|
||||
module.exports = function DeletePropertyOrThrow(O, P) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
||||
}
|
||||
|
||||
if (!IsPropertyKey(P)) {
|
||||
throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true');
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
var success = delete O[P];
|
||||
if (!success) {
|
||||
throw new $TypeError('Attempt to delete property failed.');
|
||||
}
|
||||
return success;
|
||||
};
|
||||
43
VISUALIZACION/node_modules/es-abstract/2018/DetachArrayBuffer.js
generated
vendored
Executable file
43
VISUALIZACION/node_modules/es-abstract/2018/DetachArrayBuffer.js
generated
vendored
Executable file
|
|
@ -0,0 +1,43 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $SyntaxError = GetIntrinsic('%SyntaxError%');
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var isArrayBuffer = require('is-array-buffer');
|
||||
var isSharedArrayBuffer = require('is-shared-array-buffer');
|
||||
|
||||
var MessageChannel;
|
||||
try {
|
||||
// eslint-disable-next-line global-require
|
||||
MessageChannel = require('worker_threads').MessageChannel;
|
||||
} catch (e) { /**/ }
|
||||
|
||||
// https://262.ecma-international.org/9.0/#sec-detacharraybuffer
|
||||
|
||||
/* globals postMessage */
|
||||
|
||||
module.exports = function DetachArrayBuffer(arrayBuffer) {
|
||||
if (!isArrayBuffer(arrayBuffer) || isSharedArrayBuffer(arrayBuffer)) {
|
||||
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot, and not a Shared Array Buffer');
|
||||
}
|
||||
|
||||
// commented out since there's no way to set or access this key
|
||||
// var key = arguments.length > 1 ? arguments[1] : void undefined;
|
||||
|
||||
// if (!SameValue(arrayBuffer[[ArrayBufferDetachKey]], key)) {
|
||||
// throw new $TypeError('Assertion failed: `key` must be the value of the [[ArrayBufferDetachKey]] internal slot of `arrayBuffer`');
|
||||
// }
|
||||
|
||||
if (typeof structuredClone === 'function') {
|
||||
structuredClone(arrayBuffer, { transfer: [arrayBuffer] });
|
||||
} else if (typeof postMessage === 'function') {
|
||||
postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners
|
||||
} else if (MessageChannel) {
|
||||
(new MessageChannel()).port1.postMessage(null, [arrayBuffer]);
|
||||
} else {
|
||||
throw new $SyntaxError('DetachArrayBuffer is not supported in this environment');
|
||||
}
|
||||
return null;
|
||||
};
|
||||
43
VISUALIZACION/node_modules/es-abstract/2018/EnumerableOwnPropertyNames.js
generated
vendored
Executable file
43
VISUALIZACION/node_modules/es-abstract/2018/EnumerableOwnPropertyNames.js
generated
vendored
Executable file
|
|
@ -0,0 +1,43 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var objectKeys = require('object-keys');
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var callBind = require('call-bind');
|
||||
|
||||
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
|
||||
var $pushApply = callBind.apply(GetIntrinsic('%Array.prototype.push%'));
|
||||
|
||||
var forEach = require('../helpers/forEach');
|
||||
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/8.0/#sec-enumerableownproperties
|
||||
|
||||
module.exports = function EnumerableOwnPropertyNames(O, kind) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
||||
}
|
||||
|
||||
var keys = objectKeys(O);
|
||||
if (kind === 'key') {
|
||||
return keys;
|
||||
}
|
||||
if (kind === 'value' || kind === 'key+value') {
|
||||
var results = [];
|
||||
forEach(keys, function (key) {
|
||||
if ($isEnumerable(O, key)) {
|
||||
$pushApply(results, [
|
||||
kind === 'value' ? O[key] : [key, O[key]]
|
||||
]);
|
||||
}
|
||||
});
|
||||
return results;
|
||||
}
|
||||
throw new $TypeError('Assertion failed: "kind" is not "key", "value", or "key+value": ' + kind);
|
||||
};
|
||||
16
VISUALIZACION/node_modules/es-abstract/2018/FromPropertyDescriptor.js
generated
vendored
Executable file
16
VISUALIZACION/node_modules/es-abstract/2018/FromPropertyDescriptor.js
generated
vendored
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
'use strict';
|
||||
|
||||
var assertRecord = require('../helpers/assertRecord');
|
||||
var fromPropertyDescriptor = require('../helpers/fromPropertyDescriptor');
|
||||
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-frompropertydescriptor
|
||||
|
||||
module.exports = function FromPropertyDescriptor(Desc) {
|
||||
if (typeof Desc !== 'undefined') {
|
||||
assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
|
||||
}
|
||||
|
||||
return fromPropertyDescriptor(Desc);
|
||||
};
|
||||
25
VISUALIZACION/node_modules/es-abstract/2018/Get.js
generated
vendored
Executable file
25
VISUALIZACION/node_modules/es-abstract/2018/Get.js
generated
vendored
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var inspect = require('object-inspect');
|
||||
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-get-o-p
|
||||
|
||||
module.exports = function Get(O, P) {
|
||||
// 7.3.1.1
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
||||
}
|
||||
// 7.3.1.2
|
||||
if (!IsPropertyKey(P)) {
|
||||
throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));
|
||||
}
|
||||
// 7.3.1.3
|
||||
return O[P];
|
||||
};
|
||||
9
VISUALIZACION/node_modules/es-abstract/2018/GetGlobalObject.js
generated
vendored
Executable file
9
VISUALIZACION/node_modules/es-abstract/2018/GetGlobalObject.js
generated
vendored
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
var getGlobal = require('globalthis/polyfill');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-getglobalobject
|
||||
|
||||
module.exports = function GetGlobalObject() {
|
||||
return getGlobal();
|
||||
};
|
||||
34
VISUALIZACION/node_modules/es-abstract/2018/GetIterator.js
generated
vendored
Executable file
34
VISUALIZACION/node_modules/es-abstract/2018/GetIterator.js
generated
vendored
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var getIteratorMethod = require('../helpers/getIteratorMethod');
|
||||
var AdvanceStringIndex = require('./AdvanceStringIndex');
|
||||
var Call = require('./Call');
|
||||
var GetMethod = require('./GetMethod');
|
||||
var IsArray = require('./IsArray');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-getiterator
|
||||
|
||||
module.exports = function GetIterator(obj, method) {
|
||||
var actualMethod = method;
|
||||
if (arguments.length < 2) {
|
||||
actualMethod = getIteratorMethod(
|
||||
{
|
||||
AdvanceStringIndex: AdvanceStringIndex,
|
||||
GetMethod: GetMethod,
|
||||
IsArray: IsArray
|
||||
},
|
||||
obj
|
||||
);
|
||||
}
|
||||
var iterator = Call(actualMethod, obj);
|
||||
if (Type(iterator) !== 'Object') {
|
||||
throw new $TypeError('iterator must return an object');
|
||||
}
|
||||
|
||||
return iterator;
|
||||
};
|
||||
36
VISUALIZACION/node_modules/es-abstract/2018/GetMethod.js
generated
vendored
Executable file
36
VISUALIZACION/node_modules/es-abstract/2018/GetMethod.js
generated
vendored
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var GetV = require('./GetV');
|
||||
var IsCallable = require('./IsCallable');
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
|
||||
var inspect = require('object-inspect');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-getmethod
|
||||
|
||||
module.exports = function GetMethod(O, P) {
|
||||
// 7.3.9.1
|
||||
if (!IsPropertyKey(P)) {
|
||||
throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true');
|
||||
}
|
||||
|
||||
// 7.3.9.2
|
||||
var func = GetV(O, P);
|
||||
|
||||
// 7.3.9.4
|
||||
if (func == null) {
|
||||
return void 0;
|
||||
}
|
||||
|
||||
// 7.3.9.5
|
||||
if (!IsCallable(func)) {
|
||||
throw new $TypeError(inspect(P) + ' is not a function: ' + inspect(func));
|
||||
}
|
||||
|
||||
// 7.3.9.6
|
||||
return func;
|
||||
};
|
||||
31
VISUALIZACION/node_modules/es-abstract/2018/GetOwnPropertyKeys.js
generated
vendored
Executable file
31
VISUALIZACION/node_modules/es-abstract/2018/GetOwnPropertyKeys.js
generated
vendored
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var hasSymbols = require('has-symbols')();
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var $gOPN = GetIntrinsic('%Object.getOwnPropertyNames%', true);
|
||||
var $gOPS = hasSymbols && GetIntrinsic('%Object.getOwnPropertySymbols%', true);
|
||||
var keys = require('object-keys');
|
||||
|
||||
var esType = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-getownpropertykeys
|
||||
|
||||
module.exports = function GetOwnPropertyKeys(O, Type) {
|
||||
if (esType(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
||||
}
|
||||
if (Type === 'Symbol') {
|
||||
return $gOPS ? $gOPS(O) : [];
|
||||
}
|
||||
if (Type === 'String') {
|
||||
if (!$gOPN) {
|
||||
return keys(O);
|
||||
}
|
||||
return $gOPN(O);
|
||||
}
|
||||
throw new $TypeError('Assertion failed: `Type` must be `"String"` or `"Symbol"`');
|
||||
};
|
||||
32
VISUALIZACION/node_modules/es-abstract/2018/GetPrototypeFromConstructor.js
generated
vendored
Executable file
32
VISUALIZACION/node_modules/es-abstract/2018/GetPrototypeFromConstructor.js
generated
vendored
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $Function = GetIntrinsic('%Function%');
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
var $SyntaxError = GetIntrinsic('%SyntaxError%');
|
||||
|
||||
var Get = require('./Get');
|
||||
var IsConstructor = require('./IsConstructor');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor
|
||||
|
||||
module.exports = function GetPrototypeFromConstructor(constructor, intrinsicDefaultProto) {
|
||||
var intrinsic = GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
|
||||
if (Type(intrinsic) !== 'Object') {
|
||||
throw new $TypeError('intrinsicDefaultProto must be an object');
|
||||
}
|
||||
if (!IsConstructor(constructor)) {
|
||||
throw new $TypeError('Assertion failed: `constructor` must be a constructor');
|
||||
}
|
||||
var proto = Get(constructor, 'prototype');
|
||||
if (Type(proto) !== 'Object') {
|
||||
if (!(constructor instanceof $Function)) {
|
||||
// ignore other realms, for now
|
||||
throw new $SyntaxError('cross-realm constructors not currently supported');
|
||||
}
|
||||
proto = intrinsic;
|
||||
}
|
||||
return proto;
|
||||
};
|
||||
124
VISUALIZACION/node_modules/es-abstract/2018/GetSubstitution.js
generated
vendored
Executable file
124
VISUALIZACION/node_modules/es-abstract/2018/GetSubstitution.js
generated
vendored
Executable file
|
|
@ -0,0 +1,124 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
var regexTester = require('safe-regex-test');
|
||||
var every = require('../helpers/every');
|
||||
|
||||
var $charAt = callBound('String.prototype.charAt');
|
||||
var $strSlice = callBound('String.prototype.slice');
|
||||
var $indexOf = callBound('String.prototype.indexOf');
|
||||
var $parseInt = parseInt;
|
||||
|
||||
var isDigit = regexTester(/^[0-9]$/);
|
||||
|
||||
var inspect = require('object-inspect');
|
||||
|
||||
var Get = require('./Get');
|
||||
var IsArray = require('./IsArray');
|
||||
var ToObject = require('./ToObject');
|
||||
var ToString = require('./ToString');
|
||||
var Type = require('./Type');
|
||||
|
||||
var isInteger = require('../helpers/isInteger');
|
||||
var isStringOrHole = require('../helpers/isStringOrHole');
|
||||
|
||||
// http://262.ecma-international.org/9.0/#sec-getsubstitution
|
||||
|
||||
// eslint-disable-next-line max-statements, max-params, max-lines-per-function
|
||||
module.exports = function GetSubstitution(matched, str, position, captures, namedCaptures, replacement) {
|
||||
if (Type(matched) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: `matched` must be a String');
|
||||
}
|
||||
var matchLength = matched.length;
|
||||
|
||||
if (Type(str) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: `str` must be a String');
|
||||
}
|
||||
var stringLength = str.length;
|
||||
|
||||
if (!isInteger(position) || position < 0 || position > stringLength) {
|
||||
throw new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position));
|
||||
}
|
||||
|
||||
if (!IsArray(captures) || !every(captures, isStringOrHole)) {
|
||||
throw new $TypeError('Assertion failed: `captures` must be a List of Strings, got ' + inspect(captures));
|
||||
}
|
||||
|
||||
if (Type(replacement) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: `replacement` must be a String');
|
||||
}
|
||||
|
||||
var tailPos = position + matchLength;
|
||||
var m = captures.length;
|
||||
if (Type(namedCaptures) !== 'Undefined') {
|
||||
namedCaptures = ToObject(namedCaptures); // eslint-disable-line no-param-reassign
|
||||
}
|
||||
|
||||
var result = '';
|
||||
for (var i = 0; i < replacement.length; i += 1) {
|
||||
// if this is a $, and it's not the end of the replacement
|
||||
var current = $charAt(replacement, i);
|
||||
var isLast = (i + 1) >= replacement.length;
|
||||
var nextIsLast = (i + 2) >= replacement.length;
|
||||
if (current === '$' && !isLast) {
|
||||
var next = $charAt(replacement, i + 1);
|
||||
if (next === '$') {
|
||||
result += '$';
|
||||
i += 1;
|
||||
} else if (next === '&') {
|
||||
result += matched;
|
||||
i += 1;
|
||||
} else if (next === '`') {
|
||||
result += position === 0 ? '' : $strSlice(str, 0, position - 1);
|
||||
i += 1;
|
||||
} else if (next === "'") {
|
||||
result += tailPos >= stringLength ? '' : $strSlice(str, tailPos);
|
||||
i += 1;
|
||||
} else {
|
||||
var nextNext = nextIsLast ? null : $charAt(replacement, i + 2);
|
||||
if (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) {
|
||||
// $1 through $9, and not followed by a digit
|
||||
var n = $parseInt(next, 10);
|
||||
// if (n > m, impl-defined)
|
||||
result += n <= m && Type(captures[n - 1]) === 'Undefined' ? '' : captures[n - 1];
|
||||
i += 1;
|
||||
} else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) {
|
||||
// $00 through $99
|
||||
var nn = next + nextNext;
|
||||
var nnI = $parseInt(nn, 10) - 1;
|
||||
// if nn === '00' or nn > m, impl-defined
|
||||
result += nn <= m && Type(captures[nnI]) === 'Undefined' ? '' : captures[nnI];
|
||||
i += 2;
|
||||
} else if (next === '<') {
|
||||
// eslint-disable-next-line max-depth
|
||||
if (Type(namedCaptures) === 'Undefined') {
|
||||
result += '$<';
|
||||
i += 2;
|
||||
} else {
|
||||
var endIndex = $indexOf(replacement, '>', i);
|
||||
// eslint-disable-next-line max-depth
|
||||
if (endIndex > -1) {
|
||||
var groupName = $strSlice(replacement, i + '$<'.length, endIndex);
|
||||
var capture = Get(namedCaptures, groupName);
|
||||
// eslint-disable-next-line max-depth
|
||||
if (Type(capture) !== 'Undefined') {
|
||||
result += ToString(capture);
|
||||
}
|
||||
i += ('<' + groupName + '>').length;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result += '$';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// the final $, or else not a $
|
||||
result += $charAt(replacement, i);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
25
VISUALIZACION/node_modules/es-abstract/2018/GetV.js
generated
vendored
Executable file
25
VISUALIZACION/node_modules/es-abstract/2018/GetV.js
generated
vendored
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var inspect = require('object-inspect');
|
||||
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
// var ToObject = require('./ToObject');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-getv
|
||||
|
||||
module.exports = function GetV(V, P) {
|
||||
// 7.3.2.1
|
||||
if (!IsPropertyKey(P)) {
|
||||
throw new $TypeError('Assertion failed: IsPropertyKey(P) is not true, got ' + inspect(P));
|
||||
}
|
||||
|
||||
// 7.3.2.2-3
|
||||
// var O = ToObject(V);
|
||||
|
||||
// 7.3.2.4
|
||||
return V[P];
|
||||
};
|
||||
108
VISUALIZACION/node_modules/es-abstract/2018/GetValueFromBuffer.js
generated
vendored
Executable file
108
VISUALIZACION/node_modules/es-abstract/2018/GetValueFromBuffer.js
generated
vendored
Executable file
|
|
@ -0,0 +1,108 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $SyntaxError = GetIntrinsic('%SyntaxError%');
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $slice = callBound('Array.prototype.slice');
|
||||
|
||||
var isInteger = require('../helpers/isInteger');
|
||||
|
||||
var IsDetachedBuffer = require('./IsDetachedBuffer');
|
||||
var RawBytesToNumber = require('./RawBytesToNumber');
|
||||
|
||||
var isArrayBuffer = require('is-array-buffer');
|
||||
var isSharedArrayBuffer = require('is-shared-array-buffer');
|
||||
var safeConcat = require('safe-array-concat');
|
||||
|
||||
var table50 = {
|
||||
__proto__: null,
|
||||
$Int8: 1,
|
||||
$Uint8: 1,
|
||||
$Uint8C: 1,
|
||||
$Int16: 2,
|
||||
$Uint16: 2,
|
||||
$Int32: 4,
|
||||
$Uint32: 4,
|
||||
$Float32: 4,
|
||||
$Float64: 8
|
||||
};
|
||||
|
||||
var defaultEndianness = require('../helpers/defaultEndianness');
|
||||
|
||||
// https://262.ecma-international.org/8.0/#sec-getvaluefrombuffer
|
||||
|
||||
module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) {
|
||||
var isSAB = isSharedArrayBuffer(arrayBuffer);
|
||||
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
|
||||
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
|
||||
}
|
||||
|
||||
if (!isInteger(byteIndex)) {
|
||||
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
|
||||
}
|
||||
|
||||
if (typeof type !== 'string') {
|
||||
throw new $TypeError('Assertion failed: `type` must be a string');
|
||||
}
|
||||
|
||||
if (typeof isTypedArray !== 'boolean') {
|
||||
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
|
||||
}
|
||||
|
||||
if (typeof order !== 'string') {
|
||||
throw new $TypeError('Assertion failed: `order` must be a string');
|
||||
}
|
||||
|
||||
if (arguments.length > 5 && typeof arguments[5] !== 'boolean') {
|
||||
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
|
||||
}
|
||||
|
||||
if (IsDetachedBuffer(arrayBuffer)) {
|
||||
throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1
|
||||
}
|
||||
|
||||
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
|
||||
|
||||
if (byteIndex < 0) {
|
||||
throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3
|
||||
}
|
||||
|
||||
// 4. Let block be arrayBuffer.[[ArrayBufferData]].
|
||||
|
||||
var elementSize = table50['$' + type]; // step 5
|
||||
if (!elementSize) {
|
||||
throw new $TypeError('Assertion failed: `type` must be one of "Int8", "Uint8", "Uint8C", "Int16", "Uint16", "Int32", "Uint32", "Float32", or "Float64"');
|
||||
}
|
||||
|
||||
var rawValue;
|
||||
if (isSAB) { // step 6
|
||||
/*
|
||||
a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
|
||||
b. Let eventList be the [[EventList]] field of the element in execution.[[EventLists]] whose [[AgentSignifier]] is AgentSignifier().
|
||||
c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false.
|
||||
d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values.
|
||||
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.
|
||||
f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }.
|
||||
g. Append readEvent to eventList.
|
||||
h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]].
|
||||
*/
|
||||
throw new $SyntaxError('TODO: support SharedArrayBuffers');
|
||||
} else {
|
||||
// 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex].
|
||||
rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6
|
||||
}
|
||||
|
||||
// 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.
|
||||
var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8
|
||||
|
||||
var bytes = isLittleEndian
|
||||
? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize)
|
||||
: $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize);
|
||||
|
||||
return RawBytesToNumber(type, bytes, isLittleEndian);
|
||||
};
|
||||
22
VISUALIZACION/node_modules/es-abstract/2018/HasOwnProperty.js
generated
vendored
Executable file
22
VISUALIZACION/node_modules/es-abstract/2018/HasOwnProperty.js
generated
vendored
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var has = require('has');
|
||||
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-hasownproperty
|
||||
|
||||
module.exports = function HasOwnProperty(O, P) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: `O` must be an Object');
|
||||
}
|
||||
if (!IsPropertyKey(P)) {
|
||||
throw new $TypeError('Assertion failed: `P` must be a Property Key');
|
||||
}
|
||||
return has(O, P);
|
||||
};
|
||||
20
VISUALIZACION/node_modules/es-abstract/2018/HasProperty.js
generated
vendored
Executable file
20
VISUALIZACION/node_modules/es-abstract/2018/HasProperty.js
generated
vendored
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-hasproperty
|
||||
|
||||
module.exports = function HasProperty(O, P) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: `O` must be an Object');
|
||||
}
|
||||
if (!IsPropertyKey(P)) {
|
||||
throw new $TypeError('Assertion failed: `P` must be a Property Key');
|
||||
}
|
||||
return P in O;
|
||||
};
|
||||
14
VISUALIZACION/node_modules/es-abstract/2018/HourFromTime.js
generated
vendored
Executable file
14
VISUALIZACION/node_modules/es-abstract/2018/HourFromTime.js
generated
vendored
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
'use strict';
|
||||
|
||||
var floor = require('./floor');
|
||||
var modulo = require('./modulo');
|
||||
|
||||
var timeConstants = require('../helpers/timeConstants');
|
||||
var msPerHour = timeConstants.msPerHour;
|
||||
var HoursPerDay = timeConstants.HoursPerDay;
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
|
||||
|
||||
module.exports = function HourFromTime(t) {
|
||||
return modulo(floor(t / msPerHour), HoursPerDay);
|
||||
};
|
||||
21
VISUALIZACION/node_modules/es-abstract/2018/InLeapYear.js
generated
vendored
Executable file
21
VISUALIZACION/node_modules/es-abstract/2018/InLeapYear.js
generated
vendored
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $EvalError = GetIntrinsic('%EvalError%');
|
||||
|
||||
var DaysInYear = require('./DaysInYear');
|
||||
var YearFromTime = require('./YearFromTime');
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
|
||||
|
||||
module.exports = function InLeapYear(t) {
|
||||
var days = DaysInYear(YearFromTime(t));
|
||||
if (days === 365) {
|
||||
return 0;
|
||||
}
|
||||
if (days === 366) {
|
||||
return 1;
|
||||
}
|
||||
throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days);
|
||||
};
|
||||
30
VISUALIZACION/node_modules/es-abstract/2018/InstanceofOperator.js
generated
vendored
Executable file
30
VISUALIZACION/node_modules/es-abstract/2018/InstanceofOperator.js
generated
vendored
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var $hasInstance = GetIntrinsic('Symbol.hasInstance', true);
|
||||
|
||||
var Call = require('./Call');
|
||||
var GetMethod = require('./GetMethod');
|
||||
var IsCallable = require('./IsCallable');
|
||||
var OrdinaryHasInstance = require('./OrdinaryHasInstance');
|
||||
var ToBoolean = require('./ToBoolean');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-instanceofoperator
|
||||
|
||||
module.exports = function InstanceofOperator(O, C) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
||||
}
|
||||
var instOfHandler = $hasInstance ? GetMethod(C, $hasInstance) : void 0;
|
||||
if (typeof instOfHandler !== 'undefined') {
|
||||
return ToBoolean(Call(instOfHandler, C, [O]));
|
||||
}
|
||||
if (!IsCallable(C)) {
|
||||
throw new $TypeError('`C` is not Callable');
|
||||
}
|
||||
return OrdinaryHasInstance(C, O);
|
||||
};
|
||||
24
VISUALIZACION/node_modules/es-abstract/2018/Invoke.js
generated
vendored
Executable file
24
VISUALIZACION/node_modules/es-abstract/2018/Invoke.js
generated
vendored
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var Call = require('./Call');
|
||||
var IsArray = require('./IsArray');
|
||||
var GetV = require('./GetV');
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-invoke
|
||||
|
||||
module.exports = function Invoke(O, P) {
|
||||
if (!IsPropertyKey(P)) {
|
||||
throw new $TypeError('Assertion failed: P must be a Property Key');
|
||||
}
|
||||
var argumentsList = arguments.length > 2 ? arguments[2] : [];
|
||||
if (!IsArray(argumentsList)) {
|
||||
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
|
||||
}
|
||||
var func = GetV(O, P);
|
||||
return Call(func, O, argumentsList);
|
||||
};
|
||||
23
VISUALIZACION/node_modules/es-abstract/2018/IsAccessorDescriptor.js
generated
vendored
Executable file
23
VISUALIZACION/node_modules/es-abstract/2018/IsAccessorDescriptor.js
generated
vendored
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
'use strict';
|
||||
|
||||
var has = require('has');
|
||||
|
||||
var Type = require('./Type');
|
||||
|
||||
var assertRecord = require('../helpers/assertRecord');
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-8.10.1
|
||||
|
||||
module.exports = function IsAccessorDescriptor(Desc) {
|
||||
if (typeof Desc === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
|
||||
assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
|
||||
|
||||
if (!has(Desc, '[[Get]]') && !has(Desc, '[[Set]]')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
4
VISUALIZACION/node_modules/es-abstract/2018/IsArray.js
generated
vendored
Executable file
4
VISUALIZACION/node_modules/es-abstract/2018/IsArray.js
generated
vendored
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
'use strict';
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-isarray
|
||||
module.exports = require('../helpers/IsArray');
|
||||
5
VISUALIZACION/node_modules/es-abstract/2018/IsCallable.js
generated
vendored
Executable file
5
VISUALIZACION/node_modules/es-abstract/2018/IsCallable.js
generated
vendored
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
// http://262.ecma-international.org/5.1/#sec-9.11
|
||||
|
||||
module.exports = require('is-callable');
|
||||
9
VISUALIZACION/node_modules/es-abstract/2018/IsCompatiblePropertyDescriptor.js
generated
vendored
Executable file
9
VISUALIZACION/node_modules/es-abstract/2018/IsCompatiblePropertyDescriptor.js
generated
vendored
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor
|
||||
|
||||
module.exports = function IsCompatiblePropertyDescriptor(Extensible, Desc, Current) {
|
||||
return ValidateAndApplyPropertyDescriptor(undefined, undefined, Extensible, Desc, Current);
|
||||
};
|
||||
25
VISUALIZACION/node_modules/es-abstract/2018/IsConcatSpreadable.js
generated
vendored
Executable file
25
VISUALIZACION/node_modules/es-abstract/2018/IsConcatSpreadable.js
generated
vendored
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $isConcatSpreadable = GetIntrinsic('%Symbol.isConcatSpreadable%', true);
|
||||
|
||||
var Get = require('./Get');
|
||||
var IsArray = require('./IsArray');
|
||||
var ToBoolean = require('./ToBoolean');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-isconcatspreadable
|
||||
|
||||
module.exports = function IsConcatSpreadable(O) {
|
||||
if (Type(O) !== 'Object') {
|
||||
return false;
|
||||
}
|
||||
if ($isConcatSpreadable) {
|
||||
var spreadable = Get(O, $isConcatSpreadable);
|
||||
if (typeof spreadable !== 'undefined') {
|
||||
return ToBoolean(spreadable);
|
||||
}
|
||||
}
|
||||
return IsArray(O);
|
||||
};
|
||||
40
VISUALIZACION/node_modules/es-abstract/2018/IsConstructor.js
generated
vendored
Executable file
40
VISUALIZACION/node_modules/es-abstract/2018/IsConstructor.js
generated
vendored
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('../GetIntrinsic.js');
|
||||
|
||||
var $construct = GetIntrinsic('%Reflect.construct%', true);
|
||||
|
||||
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
|
||||
try {
|
||||
DefinePropertyOrThrow({}, '', { '[[Get]]': function () {} });
|
||||
} catch (e) {
|
||||
// Accessor properties aren't supported
|
||||
DefinePropertyOrThrow = null;
|
||||
}
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-isconstructor
|
||||
|
||||
if (DefinePropertyOrThrow && $construct) {
|
||||
var isConstructorMarker = {};
|
||||
var badArrayLike = {};
|
||||
DefinePropertyOrThrow(badArrayLike, 'length', {
|
||||
'[[Get]]': function () {
|
||||
throw isConstructorMarker;
|
||||
},
|
||||
'[[Enumerable]]': true
|
||||
});
|
||||
|
||||
module.exports = function IsConstructor(argument) {
|
||||
try {
|
||||
// `Reflect.construct` invokes `IsConstructor(target)` before `Get(args, 'length')`:
|
||||
$construct(argument, badArrayLike);
|
||||
} catch (err) {
|
||||
return err === isConstructorMarker;
|
||||
}
|
||||
};
|
||||
} else {
|
||||
module.exports = function IsConstructor(argument) {
|
||||
// unfortunately there's no way to truly check this without try/catch `new argument` in old environments
|
||||
return typeof argument === 'function' && !!argument.prototype;
|
||||
};
|
||||
}
|
||||
23
VISUALIZACION/node_modules/es-abstract/2018/IsDataDescriptor.js
generated
vendored
Executable file
23
VISUALIZACION/node_modules/es-abstract/2018/IsDataDescriptor.js
generated
vendored
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
'use strict';
|
||||
|
||||
var has = require('has');
|
||||
|
||||
var Type = require('./Type');
|
||||
|
||||
var assertRecord = require('../helpers/assertRecord');
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-8.10.2
|
||||
|
||||
module.exports = function IsDataDescriptor(Desc) {
|
||||
if (typeof Desc === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
|
||||
assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
|
||||
|
||||
if (!has(Desc, '[[Value]]') && !has(Desc, '[[Writable]]')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
27
VISUALIZACION/node_modules/es-abstract/2018/IsDetachedBuffer.js
generated
vendored
Executable file
27
VISUALIZACION/node_modules/es-abstract/2018/IsDetachedBuffer.js
generated
vendored
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var $byteLength = require('array-buffer-byte-length');
|
||||
|
||||
var isArrayBuffer = require('is-array-buffer');
|
||||
|
||||
var availableTypedArrays = require('available-typed-arrays')();
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-isdetachedbuffer
|
||||
|
||||
module.exports = function IsDetachedBuffer(arrayBuffer) {
|
||||
if (!isArrayBuffer(arrayBuffer)) {
|
||||
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot');
|
||||
}
|
||||
if ($byteLength(arrayBuffer) === 0) {
|
||||
try {
|
||||
new global[availableTypedArrays[0]](arrayBuffer); // eslint-disable-line no-new
|
||||
} catch (error) {
|
||||
return !!error && error.name === 'TypeError';
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
18
VISUALIZACION/node_modules/es-abstract/2018/IsExtensible.js
generated
vendored
Executable file
18
VISUALIZACION/node_modules/es-abstract/2018/IsExtensible.js
generated
vendored
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $preventExtensions = GetIntrinsic('%Object.preventExtensions%', true);
|
||||
var $isExtensible = GetIntrinsic('%Object.isExtensible%', true);
|
||||
|
||||
var isPrimitive = require('../helpers/isPrimitive');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-isextensible-o
|
||||
|
||||
module.exports = $preventExtensions
|
||||
? function IsExtensible(obj) {
|
||||
return !isPrimitive(obj) && $isExtensible(obj);
|
||||
}
|
||||
: function IsExtensible(obj) {
|
||||
return !isPrimitive(obj);
|
||||
};
|
||||
23
VISUALIZACION/node_modules/es-abstract/2018/IsGenericDescriptor.js
generated
vendored
Executable file
23
VISUALIZACION/node_modules/es-abstract/2018/IsGenericDescriptor.js
generated
vendored
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
'use strict';
|
||||
|
||||
var assertRecord = require('../helpers/assertRecord');
|
||||
|
||||
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
|
||||
var IsDataDescriptor = require('./IsDataDescriptor');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-isgenericdescriptor
|
||||
|
||||
module.exports = function IsGenericDescriptor(Desc) {
|
||||
if (typeof Desc === 'undefined') {
|
||||
return false;
|
||||
}
|
||||
|
||||
assertRecord(Type, 'Property Descriptor', 'Desc', Desc);
|
||||
|
||||
if (!IsAccessorDescriptor(Desc) && !IsDataDescriptor(Desc)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
9
VISUALIZACION/node_modules/es-abstract/2018/IsInteger.js
generated
vendored
Executable file
9
VISUALIZACION/node_modules/es-abstract/2018/IsInteger.js
generated
vendored
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
var isInteger = require('../helpers/isInteger');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-isinteger
|
||||
|
||||
module.exports = function IsInteger(argument) {
|
||||
return isInteger(argument);
|
||||
};
|
||||
24
VISUALIZACION/node_modules/es-abstract/2018/IsPromise.js
generated
vendored
Executable file
24
VISUALIZACION/node_modules/es-abstract/2018/IsPromise.js
generated
vendored
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
'use strict';
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $PromiseThen = callBound('Promise.prototype.then', true);
|
||||
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-ispromise
|
||||
|
||||
module.exports = function IsPromise(x) {
|
||||
if (Type(x) !== 'Object') {
|
||||
return false;
|
||||
}
|
||||
if (!$PromiseThen) { // Promises are not supported
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
$PromiseThen(x); // throws if not a promise
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
7
VISUALIZACION/node_modules/es-abstract/2018/IsPropertyKey.js
generated
vendored
Executable file
7
VISUALIZACION/node_modules/es-abstract/2018/IsPropertyKey.js
generated
vendored
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-ispropertykey
|
||||
|
||||
module.exports = function IsPropertyKey(argument) {
|
||||
return typeof argument === 'string' || typeof argument === 'symbol';
|
||||
};
|
||||
24
VISUALIZACION/node_modules/es-abstract/2018/IsRegExp.js
generated
vendored
Executable file
24
VISUALIZACION/node_modules/es-abstract/2018/IsRegExp.js
generated
vendored
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $match = GetIntrinsic('%Symbol.match%', true);
|
||||
|
||||
var hasRegExpMatcher = require('is-regex');
|
||||
|
||||
var ToBoolean = require('./ToBoolean');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-isregexp
|
||||
|
||||
module.exports = function IsRegExp(argument) {
|
||||
if (!argument || typeof argument !== 'object') {
|
||||
return false;
|
||||
}
|
||||
if ($match) {
|
||||
var isRegExp = argument[$match];
|
||||
if (typeof isRegExp !== 'undefined') {
|
||||
return ToBoolean(isRegExp);
|
||||
}
|
||||
}
|
||||
return hasRegExpMatcher(argument);
|
||||
};
|
||||
19
VISUALIZACION/node_modules/es-abstract/2018/IsSharedArrayBuffer.js
generated
vendored
Executable file
19
VISUALIZACION/node_modules/es-abstract/2018/IsSharedArrayBuffer.js
generated
vendored
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var Type = require('./Type');
|
||||
|
||||
var isSharedArrayBuffer = require('is-shared-array-buffer');
|
||||
|
||||
// https://262.ecma-international.org/8.0/#sec-issharedarraybuffer
|
||||
|
||||
module.exports = function IsSharedArrayBuffer(obj) {
|
||||
if (Type(obj) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
||||
}
|
||||
|
||||
return isSharedArrayBuffer(obj);
|
||||
};
|
||||
47
VISUALIZACION/node_modules/es-abstract/2018/IsStringPrefix.js
generated
vendored
Executable file
47
VISUALIZACION/node_modules/es-abstract/2018/IsStringPrefix.js
generated
vendored
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var isPrefixOf = require('../helpers/isPrefixOf');
|
||||
|
||||
// var callBound = require('call-bind/callBound');
|
||||
|
||||
// var $charAt = callBound('String.prototype.charAt');
|
||||
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/9.0/#sec-isstringprefix
|
||||
|
||||
module.exports = function IsStringPrefix(p, q) {
|
||||
if (Type(p) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: "p" must be a String');
|
||||
}
|
||||
|
||||
if (Type(q) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: "q" must be a String');
|
||||
}
|
||||
|
||||
return isPrefixOf(p, q);
|
||||
/*
|
||||
if (p === q || p === '') {
|
||||
return true;
|
||||
}
|
||||
|
||||
var pLength = p.length;
|
||||
var qLength = q.length;
|
||||
if (pLength >= qLength) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// assert: pLength < qLength
|
||||
|
||||
for (var i = 0; i < pLength; i += 1) {
|
||||
if ($charAt(p, i) !== $charAt(q, i)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
*/
|
||||
};
|
||||
48
VISUALIZACION/node_modules/es-abstract/2018/IsWordChar.js
generated
vendored
Executable file
48
VISUALIZACION/node_modules/es-abstract/2018/IsWordChar.js
generated
vendored
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $indexOf = callBound('String.prototype.indexOf');
|
||||
|
||||
var IsArray = require('./IsArray');
|
||||
var IsInteger = require('./IsInteger');
|
||||
var Type = require('./Type');
|
||||
var WordCharacters = require('./WordCharacters');
|
||||
|
||||
var every = require('../helpers/every');
|
||||
|
||||
var isChar = function isChar(c) {
|
||||
return typeof c === 'string';
|
||||
};
|
||||
|
||||
// https://262.ecma-international.org/8.0/#sec-runtime-semantics-iswordchar-abstract-operation
|
||||
|
||||
// note: prior to ES2023, this AO erroneously omitted the latter of its arguments.
|
||||
module.exports = function IsWordChar(e, InputLength, Input, IgnoreCase, Unicode) {
|
||||
if (!IsInteger(e)) {
|
||||
throw new $TypeError('Assertion failed: `e` must be an integer');
|
||||
}
|
||||
if (!IsInteger(InputLength)) {
|
||||
throw new $TypeError('Assertion failed: `InputLength` must be an integer');
|
||||
}
|
||||
if (!IsArray(Input) || !every(Input, isChar)) {
|
||||
throw new $TypeError('Assertion failed: `Input` must be a List of characters');
|
||||
}
|
||||
if (Type(IgnoreCase) !== 'Boolean' || Type(Unicode) !== 'Boolean') {
|
||||
throw new $TypeError('Assertion failed: `IgnoreCase` and `Unicode` must be booleans');
|
||||
}
|
||||
|
||||
if (e === -1 || e === InputLength) {
|
||||
return false; // step 1
|
||||
}
|
||||
|
||||
var c = Input[e]; // step 2
|
||||
|
||||
var wordChars = WordCharacters(IgnoreCase, Unicode);
|
||||
|
||||
return $indexOf(wordChars, c) > -1; // steps 3-4
|
||||
};
|
||||
24
VISUALIZACION/node_modules/es-abstract/2018/IterableToList.js
generated
vendored
Executable file
24
VISUALIZACION/node_modules/es-abstract/2018/IterableToList.js
generated
vendored
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
'use strict';
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
var $arrayPush = callBound('Array.prototype.push');
|
||||
|
||||
var GetIterator = require('./GetIterator');
|
||||
var IteratorStep = require('./IteratorStep');
|
||||
var IteratorValue = require('./IteratorValue');
|
||||
|
||||
// https://262.ecma-international.org/8.0/#sec-iterabletolist
|
||||
|
||||
module.exports = function IterableToList(items, method) {
|
||||
var iterator = GetIterator(items, method);
|
||||
var values = [];
|
||||
var next = true;
|
||||
while (next) {
|
||||
next = IteratorStep(iterator);
|
||||
if (next) {
|
||||
var nextValue = IteratorValue(next);
|
||||
$arrayPush(values, nextValue);
|
||||
}
|
||||
}
|
||||
return values;
|
||||
};
|
||||
51
VISUALIZACION/node_modules/es-abstract/2018/IteratorClose.js
generated
vendored
Executable file
51
VISUALIZACION/node_modules/es-abstract/2018/IteratorClose.js
generated
vendored
Executable file
|
|
@ -0,0 +1,51 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var Call = require('./Call');
|
||||
var CompletionRecord = require('./CompletionRecord');
|
||||
var GetMethod = require('./GetMethod');
|
||||
var IsCallable = require('./IsCallable');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-iteratorclose
|
||||
|
||||
module.exports = function IteratorClose(iterator, completion) {
|
||||
if (Type(iterator) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(iterator) is not Object');
|
||||
}
|
||||
if (!IsCallable(completion) && !(completion instanceof CompletionRecord)) {
|
||||
throw new $TypeError('Assertion failed: completion is not a thunk representing a Completion Record, nor a Completion Record instance');
|
||||
}
|
||||
var completionThunk = completion instanceof CompletionRecord ? function () { return completion['?'](); } : completion;
|
||||
|
||||
var iteratorReturn = GetMethod(iterator, 'return');
|
||||
|
||||
if (typeof iteratorReturn === 'undefined') {
|
||||
return completionThunk();
|
||||
}
|
||||
|
||||
var completionRecord;
|
||||
try {
|
||||
var innerResult = Call(iteratorReturn, iterator, []);
|
||||
} catch (e) {
|
||||
// if we hit here, then "e" is the innerResult completion that needs re-throwing
|
||||
|
||||
// if the completion is of type "throw", this will throw.
|
||||
completionThunk();
|
||||
completionThunk = null; // ensure it's not called twice.
|
||||
|
||||
// if not, then return the innerResult completion
|
||||
throw e;
|
||||
}
|
||||
completionRecord = completionThunk(); // if innerResult worked, then throw if the completion does
|
||||
completionThunk = null; // ensure it's not called twice.
|
||||
|
||||
if (Type(innerResult) !== 'Object') {
|
||||
throw new $TypeError('iterator .return must return an object');
|
||||
}
|
||||
|
||||
return completionRecord;
|
||||
};
|
||||
18
VISUALIZACION/node_modules/es-abstract/2018/IteratorComplete.js
generated
vendored
Executable file
18
VISUALIZACION/node_modules/es-abstract/2018/IteratorComplete.js
generated
vendored
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var Get = require('./Get');
|
||||
var ToBoolean = require('./ToBoolean');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-iteratorcomplete
|
||||
|
||||
module.exports = function IteratorComplete(iterResult) {
|
||||
if (Type(iterResult) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
|
||||
}
|
||||
return ToBoolean(Get(iterResult, 'done'));
|
||||
};
|
||||
18
VISUALIZACION/node_modules/es-abstract/2018/IteratorNext.js
generated
vendored
Executable file
18
VISUALIZACION/node_modules/es-abstract/2018/IteratorNext.js
generated
vendored
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var Invoke = require('./Invoke');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-iteratornext
|
||||
|
||||
module.exports = function IteratorNext(iterator, value) {
|
||||
var result = Invoke(iterator, 'next', arguments.length < 2 ? [] : [value]);
|
||||
if (Type(result) !== 'Object') {
|
||||
throw new $TypeError('iterator next must return an object');
|
||||
}
|
||||
return result;
|
||||
};
|
||||
13
VISUALIZACION/node_modules/es-abstract/2018/IteratorStep.js
generated
vendored
Executable file
13
VISUALIZACION/node_modules/es-abstract/2018/IteratorStep.js
generated
vendored
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
var IteratorComplete = require('./IteratorComplete');
|
||||
var IteratorNext = require('./IteratorNext');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-iteratorstep
|
||||
|
||||
module.exports = function IteratorStep(iterator) {
|
||||
var result = IteratorNext(iterator);
|
||||
var done = IteratorComplete(result);
|
||||
return done === true ? false : result;
|
||||
};
|
||||
|
||||
18
VISUALIZACION/node_modules/es-abstract/2018/IteratorValue.js
generated
vendored
Executable file
18
VISUALIZACION/node_modules/es-abstract/2018/IteratorValue.js
generated
vendored
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var Get = require('./Get');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-iteratorvalue
|
||||
|
||||
module.exports = function IteratorValue(iterResult) {
|
||||
if (Type(iterResult) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
|
||||
}
|
||||
return Get(iterResult, 'value');
|
||||
};
|
||||
|
||||
13
VISUALIZACION/node_modules/es-abstract/2018/MakeDate.js
generated
vendored
Executable file
13
VISUALIZACION/node_modules/es-abstract/2018/MakeDate.js
generated
vendored
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
var $isFinite = require('../helpers/isFinite');
|
||||
var msPerDay = require('../helpers/timeConstants').msPerDay;
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-15.9.1.13
|
||||
|
||||
module.exports = function MakeDate(day, time) {
|
||||
if (!$isFinite(day) || !$isFinite(time)) {
|
||||
return NaN;
|
||||
}
|
||||
return (day * msPerDay) + time;
|
||||
};
|
||||
33
VISUALIZACION/node_modules/es-abstract/2018/MakeDay.js
generated
vendored
Executable file
33
VISUALIZACION/node_modules/es-abstract/2018/MakeDay.js
generated
vendored
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $DateUTC = GetIntrinsic('%Date.UTC%');
|
||||
|
||||
var $isFinite = require('../helpers/isFinite');
|
||||
|
||||
var DateFromTime = require('./DateFromTime');
|
||||
var Day = require('./Day');
|
||||
var floor = require('./floor');
|
||||
var modulo = require('./modulo');
|
||||
var MonthFromTime = require('./MonthFromTime');
|
||||
var ToInteger = require('./ToInteger');
|
||||
var YearFromTime = require('./YearFromTime');
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-15.9.1.12
|
||||
|
||||
module.exports = function MakeDay(year, month, date) {
|
||||
if (!$isFinite(year) || !$isFinite(month) || !$isFinite(date)) {
|
||||
return NaN;
|
||||
}
|
||||
var y = ToInteger(year);
|
||||
var m = ToInteger(month);
|
||||
var dt = ToInteger(date);
|
||||
var ym = y + floor(m / 12);
|
||||
var mn = modulo(m, 12);
|
||||
var t = $DateUTC(ym, mn, 1);
|
||||
if (YearFromTime(t) !== ym || MonthFromTime(t) !== mn || DateFromTime(t) !== 1) {
|
||||
return NaN;
|
||||
}
|
||||
return Day(t) + dt - 1;
|
||||
};
|
||||
23
VISUALIZACION/node_modules/es-abstract/2018/MakeTime.js
generated
vendored
Executable file
23
VISUALIZACION/node_modules/es-abstract/2018/MakeTime.js
generated
vendored
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
'use strict';
|
||||
|
||||
var $isFinite = require('../helpers/isFinite');
|
||||
var timeConstants = require('../helpers/timeConstants');
|
||||
var msPerSecond = timeConstants.msPerSecond;
|
||||
var msPerMinute = timeConstants.msPerMinute;
|
||||
var msPerHour = timeConstants.msPerHour;
|
||||
|
||||
var ToInteger = require('./ToInteger');
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-15.9.1.11
|
||||
|
||||
module.exports = function MakeTime(hour, min, sec, ms) {
|
||||
if (!$isFinite(hour) || !$isFinite(min) || !$isFinite(sec) || !$isFinite(ms)) {
|
||||
return NaN;
|
||||
}
|
||||
var h = ToInteger(hour);
|
||||
var m = ToInteger(min);
|
||||
var s = ToInteger(sec);
|
||||
var milli = ToInteger(ms);
|
||||
var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli;
|
||||
return t;
|
||||
};
|
||||
14
VISUALIZACION/node_modules/es-abstract/2018/MinFromTime.js
generated
vendored
Executable file
14
VISUALIZACION/node_modules/es-abstract/2018/MinFromTime.js
generated
vendored
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
'use strict';
|
||||
|
||||
var floor = require('./floor');
|
||||
var modulo = require('./modulo');
|
||||
|
||||
var timeConstants = require('../helpers/timeConstants');
|
||||
var msPerMinute = timeConstants.msPerMinute;
|
||||
var MinutesPerHour = timeConstants.MinutesPerHour;
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
|
||||
|
||||
module.exports = function MinFromTime(t) {
|
||||
return modulo(floor(t / msPerMinute), MinutesPerHour);
|
||||
};
|
||||
47
VISUALIZACION/node_modules/es-abstract/2018/MonthFromTime.js
generated
vendored
Executable file
47
VISUALIZACION/node_modules/es-abstract/2018/MonthFromTime.js
generated
vendored
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
'use strict';
|
||||
|
||||
var DayWithinYear = require('./DayWithinYear');
|
||||
var InLeapYear = require('./InLeapYear');
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-15.9.1.4
|
||||
|
||||
module.exports = function MonthFromTime(t) {
|
||||
var day = DayWithinYear(t);
|
||||
if (0 <= day && day < 31) {
|
||||
return 0;
|
||||
}
|
||||
var leap = InLeapYear(t);
|
||||
if (31 <= day && day < (59 + leap)) {
|
||||
return 1;
|
||||
}
|
||||
if ((59 + leap) <= day && day < (90 + leap)) {
|
||||
return 2;
|
||||
}
|
||||
if ((90 + leap) <= day && day < (120 + leap)) {
|
||||
return 3;
|
||||
}
|
||||
if ((120 + leap) <= day && day < (151 + leap)) {
|
||||
return 4;
|
||||
}
|
||||
if ((151 + leap) <= day && day < (181 + leap)) {
|
||||
return 5;
|
||||
}
|
||||
if ((181 + leap) <= day && day < (212 + leap)) {
|
||||
return 6;
|
||||
}
|
||||
if ((212 + leap) <= day && day < (243 + leap)) {
|
||||
return 7;
|
||||
}
|
||||
if ((243 + leap) <= day && day < (273 + leap)) {
|
||||
return 8;
|
||||
}
|
||||
if ((273 + leap) <= day && day < (304 + leap)) {
|
||||
return 9;
|
||||
}
|
||||
if ((304 + leap) <= day && day < (334 + leap)) {
|
||||
return 10;
|
||||
}
|
||||
if ((334 + leap) <= day && day < (365 + leap)) {
|
||||
return 11;
|
||||
}
|
||||
};
|
||||
36
VISUALIZACION/node_modules/es-abstract/2018/NewPromiseCapability.js
generated
vendored
Executable file
36
VISUALIZACION/node_modules/es-abstract/2018/NewPromiseCapability.js
generated
vendored
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var IsCallable = require('es-abstract/2022/IsCallable');
|
||||
var IsConstructor = require('es-abstract/2022/IsConstructor');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-newpromisecapability
|
||||
|
||||
module.exports = function NewPromiseCapability(C) {
|
||||
if (!IsConstructor(C)) {
|
||||
throw new $TypeError('C must be a constructor'); // step 1
|
||||
}
|
||||
|
||||
var resolvingFunctions = { '[[Resolve]]': void undefined, '[[Reject]]': void undefined }; // step 3
|
||||
|
||||
var promise = new C(function (resolve, reject) { // steps 4-5
|
||||
if (typeof resolvingFunctions['[[Resolve]]'] !== 'undefined' || typeof resolvingFunctions['[[Reject]]'] !== 'undefined') {
|
||||
throw new $TypeError('executor has already been called'); // step 4.a, 4.b
|
||||
}
|
||||
resolvingFunctions['[[Resolve]]'] = resolve; // step 4.c
|
||||
resolvingFunctions['[[Reject]]'] = reject; // step 4.d
|
||||
}); // step 4-6
|
||||
|
||||
if (!IsCallable(resolvingFunctions['[[Resolve]]']) || !IsCallable(resolvingFunctions['[[Reject]]'])) {
|
||||
throw new $TypeError('executor must provide valid resolve and reject functions'); // steps 7-8
|
||||
}
|
||||
|
||||
return {
|
||||
'[[Promise]]': promise,
|
||||
'[[Resolve]]': resolvingFunctions['[[Resolve]]'],
|
||||
'[[Reject]]': resolvingFunctions['[[Reject]]']
|
||||
}; // step 9
|
||||
};
|
||||
9
VISUALIZACION/node_modules/es-abstract/2018/NormalCompletion.js
generated
vendored
Executable file
9
VISUALIZACION/node_modules/es-abstract/2018/NormalCompletion.js
generated
vendored
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
var CompletionRecord = require('./CompletionRecord');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-normalcompletion
|
||||
|
||||
module.exports = function NormalCompletion(value) {
|
||||
return new CompletionRecord('normal', value);
|
||||
};
|
||||
74
VISUALIZACION/node_modules/es-abstract/2018/NumberToRawBytes.js
generated
vendored
Executable file
74
VISUALIZACION/node_modules/es-abstract/2018/NumberToRawBytes.js
generated
vendored
Executable file
|
|
@ -0,0 +1,74 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var hasOwnProperty = require('./HasOwnProperty');
|
||||
var ToInt16 = require('./ToInt16');
|
||||
var ToInt32 = require('./ToInt32');
|
||||
var ToInt8 = require('./ToInt8');
|
||||
var ToUint16 = require('./ToUint16');
|
||||
var ToUint32 = require('./ToUint32');
|
||||
var ToUint8 = require('./ToUint8');
|
||||
var ToUint8Clamp = require('./ToUint8Clamp');
|
||||
var Type = require('./Type');
|
||||
|
||||
var valueToFloat32Bytes = require('../helpers/valueToFloat32Bytes');
|
||||
var valueToFloat64Bytes = require('../helpers/valueToFloat64Bytes');
|
||||
var integerToNBytes = require('../helpers/integerToNBytes');
|
||||
|
||||
var keys = require('object-keys');
|
||||
|
||||
// https://262.ecma-international.org/8.0/#table-50
|
||||
var TypeToSizes = {
|
||||
__proto__: null,
|
||||
Int8: 1,
|
||||
Uint8: 1,
|
||||
Uint8C: 1,
|
||||
Int16: 2,
|
||||
Uint16: 2,
|
||||
Int32: 4,
|
||||
Uint32: 4,
|
||||
Float32: 4,
|
||||
Float64: 8
|
||||
};
|
||||
|
||||
var TypeToAO = {
|
||||
__proto__: null,
|
||||
Int8: ToInt8,
|
||||
Uint8: ToUint8,
|
||||
Uint8C: ToUint8Clamp,
|
||||
Int16: ToInt16,
|
||||
Uint16: ToUint16,
|
||||
Int32: ToInt32,
|
||||
Uint32: ToUint32
|
||||
};
|
||||
|
||||
// https://262.ecma-international.org/8.0/#sec-numbertorawbytes
|
||||
|
||||
module.exports = function NumberToRawBytes(type, value, isLittleEndian) {
|
||||
if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) {
|
||||
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes));
|
||||
}
|
||||
if (Type(value) !== 'Number') {
|
||||
throw new $TypeError('Assertion failed: `value` must be a Number');
|
||||
}
|
||||
if (Type(isLittleEndian) !== 'Boolean') {
|
||||
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
|
||||
}
|
||||
|
||||
if (type === 'Float32') { // step 1
|
||||
return valueToFloat32Bytes(value, isLittleEndian);
|
||||
} else if (type === 'Float64') { // step 2
|
||||
return valueToFloat64Bytes(value, isLittleEndian);
|
||||
} // step 3
|
||||
|
||||
var n = TypeToSizes[type]; // step 3.a
|
||||
|
||||
var convOp = TypeToAO[type]; // step 3.b
|
||||
|
||||
var intValue = convOp(value); // step 3.c
|
||||
|
||||
return integerToNBytes(intValue, n, isLittleEndian); // step 3.d, 3.e, 4
|
||||
};
|
||||
19
VISUALIZACION/node_modules/es-abstract/2018/NumberToString.js
generated
vendored
Executable file
19
VISUALIZACION/node_modules/es-abstract/2018/NumberToString.js
generated
vendored
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $String = GetIntrinsic('%String%');
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/9.0/#sec-tostring-applied-to-the-number-type
|
||||
|
||||
module.exports = function NumberToString(m) {
|
||||
if (Type(m) !== 'Number') {
|
||||
throw new $TypeError('Assertion failed: "m" must be a String');
|
||||
}
|
||||
|
||||
return $String(m);
|
||||
};
|
||||
|
||||
50
VISUALIZACION/node_modules/es-abstract/2018/ObjectCreate.js
generated
vendored
Executable file
50
VISUALIZACION/node_modules/es-abstract/2018/ObjectCreate.js
generated
vendored
Executable file
|
|
@ -0,0 +1,50 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $ObjectCreate = GetIntrinsic('%Object.create%', true);
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
var $SyntaxError = GetIntrinsic('%SyntaxError%');
|
||||
|
||||
var IsArray = require('./IsArray');
|
||||
var Type = require('./Type');
|
||||
|
||||
var forEach = require('../helpers/forEach');
|
||||
|
||||
var SLOT = require('internal-slot');
|
||||
|
||||
var hasProto = require('has-proto')();
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-objectcreate
|
||||
|
||||
module.exports = function ObjectCreate(proto, internalSlotsList) {
|
||||
if (proto !== null && Type(proto) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: `proto` must be null or an object');
|
||||
}
|
||||
var slots = arguments.length < 2 ? [] : internalSlotsList; // step 1
|
||||
if (arguments.length >= 2 && !IsArray(slots)) {
|
||||
throw new $TypeError('Assertion failed: `internalSlotsList` must be an Array');
|
||||
}
|
||||
|
||||
var O;
|
||||
if ($ObjectCreate) {
|
||||
O = $ObjectCreate(proto);
|
||||
} else if (hasProto) {
|
||||
O = { __proto__: proto };
|
||||
} else {
|
||||
if (proto === null) {
|
||||
throw new $SyntaxError('native Object.create support is required to create null objects');
|
||||
}
|
||||
var T = function T() {};
|
||||
T.prototype = proto;
|
||||
O = new T();
|
||||
}
|
||||
|
||||
if (slots.length > 0) {
|
||||
forEach(slots, function (slot) {
|
||||
SLOT.set(O, slot, void undefined);
|
||||
});
|
||||
}
|
||||
|
||||
return O; // step 6
|
||||
};
|
||||
38
VISUALIZACION/node_modules/es-abstract/2018/ObjectDefineProperties.js
generated
vendored
Executable file
38
VISUALIZACION/node_modules/es-abstract/2018/ObjectDefineProperties.js
generated
vendored
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
'use strict';
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var DefinePropertyOrThrow = require('./DefinePropertyOrThrow');
|
||||
var Get = require('./Get');
|
||||
var ToObject = require('./ToObject');
|
||||
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
|
||||
|
||||
var forEach = require('../helpers/forEach');
|
||||
var getOwnPropertyDescriptor = require('gopd');
|
||||
var OwnPropertyKeys = require('../helpers/OwnPropertyKeys');
|
||||
|
||||
var $push = callBound('Array.prototype.push');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-objectdefineproperties
|
||||
module.exports = function ObjectDefineProperties(O, Properties) {
|
||||
var props = ToObject(Properties); // step 1
|
||||
var keys = OwnPropertyKeys(props); // step 2
|
||||
var descriptors = []; // step 3
|
||||
|
||||
forEach(keys, function (nextKey) { // step 4
|
||||
var propDesc = ToPropertyDescriptor(getOwnPropertyDescriptor(props, nextKey)); // step 4.a
|
||||
if (typeof propDesc !== 'undefined' && propDesc['[[Enumerable]]']) { // step 4.b
|
||||
var descObj = Get(props, nextKey); // step 4.b.i
|
||||
var desc = ToPropertyDescriptor(descObj); // step 4.b.ii
|
||||
$push(descriptors, [nextKey, desc]); // step 4.b.iii
|
||||
}
|
||||
});
|
||||
|
||||
forEach(descriptors, function (pair) { // step 5
|
||||
var P = pair[0]; // step 5.a
|
||||
var desc = pair[1]; // step 5.b
|
||||
DefinePropertyOrThrow(O, P, desc); // step 5.c
|
||||
});
|
||||
|
||||
return O; // step 6
|
||||
};
|
||||
20
VISUALIZACION/node_modules/es-abstract/2018/OrdinaryCreateFromConstructor.js
generated
vendored
Executable file
20
VISUALIZACION/node_modules/es-abstract/2018/OrdinaryCreateFromConstructor.js
generated
vendored
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var GetPrototypeFromConstructor = require('./GetPrototypeFromConstructor');
|
||||
var IsArray = require('./IsArray');
|
||||
var ObjectCreate = require('./ObjectCreate');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor
|
||||
|
||||
module.exports = function OrdinaryCreateFromConstructor(constructor, intrinsicDefaultProto) {
|
||||
GetIntrinsic(intrinsicDefaultProto); // throws if not a valid intrinsic
|
||||
var proto = GetPrototypeFromConstructor(constructor, intrinsicDefaultProto);
|
||||
var slots = arguments.length < 3 ? [] : arguments[2];
|
||||
if (!IsArray(slots)) {
|
||||
throw new $TypeError('Assertion failed: if provided, `internalSlotsList` must be a List');
|
||||
}
|
||||
return ObjectCreate(proto, slots);
|
||||
};
|
||||
61
VISUALIZACION/node_modules/es-abstract/2018/OrdinaryDefineOwnProperty.js
generated
vendored
Executable file
61
VISUALIZACION/node_modules/es-abstract/2018/OrdinaryDefineOwnProperty.js
generated
vendored
Executable file
|
|
@ -0,0 +1,61 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $gOPD = require('gopd');
|
||||
var $SyntaxError = GetIntrinsic('%SyntaxError%');
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var isPropertyDescriptor = require('../helpers/isPropertyDescriptor');
|
||||
|
||||
var IsAccessorDescriptor = require('./IsAccessorDescriptor');
|
||||
var IsDataDescriptor = require('./IsDataDescriptor');
|
||||
var IsExtensible = require('./IsExtensible');
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
|
||||
var SameValue = require('./SameValue');
|
||||
var Type = require('./Type');
|
||||
var ValidateAndApplyPropertyDescriptor = require('./ValidateAndApplyPropertyDescriptor');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty
|
||||
|
||||
module.exports = function OrdinaryDefineOwnProperty(O, P, Desc) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: O must be an Object');
|
||||
}
|
||||
if (!IsPropertyKey(P)) {
|
||||
throw new $TypeError('Assertion failed: P must be a Property Key');
|
||||
}
|
||||
if (!isPropertyDescriptor({
|
||||
Type: Type,
|
||||
IsDataDescriptor: IsDataDescriptor,
|
||||
IsAccessorDescriptor: IsAccessorDescriptor
|
||||
}, Desc)) {
|
||||
throw new $TypeError('Assertion failed: Desc must be a Property Descriptor');
|
||||
}
|
||||
if (!$gOPD) {
|
||||
// ES3/IE 8 fallback
|
||||
if (IsAccessorDescriptor(Desc)) {
|
||||
throw new $SyntaxError('This environment does not support accessor property descriptors.');
|
||||
}
|
||||
var creatingNormalDataProperty = !(P in O)
|
||||
&& Desc['[[Writable]]']
|
||||
&& Desc['[[Enumerable]]']
|
||||
&& Desc['[[Configurable]]']
|
||||
&& '[[Value]]' in Desc;
|
||||
var settingExistingDataProperty = (P in O)
|
||||
&& (!('[[Configurable]]' in Desc) || Desc['[[Configurable]]'])
|
||||
&& (!('[[Enumerable]]' in Desc) || Desc['[[Enumerable]]'])
|
||||
&& (!('[[Writable]]' in Desc) || Desc['[[Writable]]'])
|
||||
&& '[[Value]]' in Desc;
|
||||
if (creatingNormalDataProperty || settingExistingDataProperty) {
|
||||
O[P] = Desc['[[Value]]']; // eslint-disable-line no-param-reassign
|
||||
return SameValue(O[P], Desc['[[Value]]']);
|
||||
}
|
||||
throw new $SyntaxError('This environment does not support defining non-writable, non-enumerable, or non-configurable properties');
|
||||
}
|
||||
var desc = $gOPD(O, P);
|
||||
var current = desc && ToPropertyDescriptor(desc);
|
||||
var extensible = IsExtensible(O);
|
||||
return ValidateAndApplyPropertyDescriptor(O, P, extensible, Desc, current);
|
||||
};
|
||||
44
VISUALIZACION/node_modules/es-abstract/2018/OrdinaryGetOwnProperty.js
generated
vendored
Executable file
44
VISUALIZACION/node_modules/es-abstract/2018/OrdinaryGetOwnProperty.js
generated
vendored
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $gOPD = require('gopd');
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
|
||||
|
||||
var has = require('has');
|
||||
|
||||
var IsArray = require('./IsArray');
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
var IsRegExp = require('./IsRegExp');
|
||||
var ToPropertyDescriptor = require('./ToPropertyDescriptor');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty
|
||||
|
||||
module.exports = function OrdinaryGetOwnProperty(O, P) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: O must be an Object');
|
||||
}
|
||||
if (!IsPropertyKey(P)) {
|
||||
throw new $TypeError('Assertion failed: P must be a Property Key');
|
||||
}
|
||||
if (!has(O, P)) {
|
||||
return void 0;
|
||||
}
|
||||
if (!$gOPD) {
|
||||
// ES3 / IE 8 fallback
|
||||
var arrayLength = IsArray(O) && P === 'length';
|
||||
var regexLastIndex = IsRegExp(O) && P === 'lastIndex';
|
||||
return {
|
||||
'[[Configurable]]': !(arrayLength || regexLastIndex),
|
||||
'[[Enumerable]]': $isEnumerable(O, P),
|
||||
'[[Value]]': O[P],
|
||||
'[[Writable]]': true
|
||||
};
|
||||
}
|
||||
return ToPropertyDescriptor($gOPD(O, P));
|
||||
};
|
||||
21
VISUALIZACION/node_modules/es-abstract/2018/OrdinaryGetPrototypeOf.js
generated
vendored
Executable file
21
VISUALIZACION/node_modules/es-abstract/2018/OrdinaryGetPrototypeOf.js
generated
vendored
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var $getProto = require('../helpers/getProto');
|
||||
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/7.0/#sec-ordinarygetprototypeof
|
||||
|
||||
module.exports = function OrdinaryGetPrototypeOf(O) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: O must be an Object');
|
||||
}
|
||||
if (!$getProto) {
|
||||
throw new $TypeError('This environment does not support fetching prototypes.');
|
||||
}
|
||||
return $getProto(O);
|
||||
};
|
||||
25
VISUALIZACION/node_modules/es-abstract/2018/OrdinaryHasInstance.js
generated
vendored
Executable file
25
VISUALIZACION/node_modules/es-abstract/2018/OrdinaryHasInstance.js
generated
vendored
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var Get = require('./Get');
|
||||
var IsCallable = require('./IsCallable');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance
|
||||
|
||||
module.exports = function OrdinaryHasInstance(C, O) {
|
||||
if (!IsCallable(C)) {
|
||||
return false;
|
||||
}
|
||||
if (Type(O) !== 'Object') {
|
||||
return false;
|
||||
}
|
||||
var P = Get(C, 'prototype');
|
||||
if (Type(P) !== 'Object') {
|
||||
throw new $TypeError('OrdinaryHasInstance called on an object with an invalid prototype property.');
|
||||
}
|
||||
return O instanceof C;
|
||||
};
|
||||
20
VISUALIZACION/node_modules/es-abstract/2018/OrdinaryHasProperty.js
generated
vendored
Executable file
20
VISUALIZACION/node_modules/es-abstract/2018/OrdinaryHasProperty.js
generated
vendored
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty
|
||||
|
||||
module.exports = function OrdinaryHasProperty(O, P) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
||||
}
|
||||
if (!IsPropertyKey(P)) {
|
||||
throw new $TypeError('Assertion failed: P must be a Property Key');
|
||||
}
|
||||
return P in O;
|
||||
};
|
||||
53
VISUALIZACION/node_modules/es-abstract/2018/OrdinarySetPrototypeOf.js
generated
vendored
Executable file
53
VISUALIZACION/node_modules/es-abstract/2018/OrdinarySetPrototypeOf.js
generated
vendored
Executable file
|
|
@ -0,0 +1,53 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var $setProto = require('../helpers/setProto');
|
||||
|
||||
var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof
|
||||
|
||||
module.exports = function OrdinarySetPrototypeOf(O, V) {
|
||||
if (Type(V) !== 'Object' && Type(V) !== 'Null') {
|
||||
throw new $TypeError('Assertion failed: V must be Object or Null');
|
||||
}
|
||||
/*
|
||||
var extensible = IsExtensible(O);
|
||||
var current = OrdinaryGetPrototypeOf(O);
|
||||
if (SameValue(V, current)) {
|
||||
return true;
|
||||
}
|
||||
if (!extensible) {
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
try {
|
||||
$setProto(O, V);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
return OrdinaryGetPrototypeOf(O) === V;
|
||||
/*
|
||||
var p = V;
|
||||
var done = false;
|
||||
while (!done) {
|
||||
if (p === null) {
|
||||
done = true;
|
||||
} else if (SameValue(p, O)) {
|
||||
return false;
|
||||
} else {
|
||||
if (wat) {
|
||||
done = true;
|
||||
} else {
|
||||
p = p.[[Prototype]];
|
||||
}
|
||||
}
|
||||
}
|
||||
O.[[Prototype]] = V;
|
||||
return true;
|
||||
*/
|
||||
};
|
||||
38
VISUALIZACION/node_modules/es-abstract/2018/OrdinaryToPrimitive.js
generated
vendored
Executable file
38
VISUALIZACION/node_modules/es-abstract/2018/OrdinaryToPrimitive.js
generated
vendored
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var Call = require('./Call');
|
||||
var Get = require('./Get');
|
||||
var IsCallable = require('./IsCallable');
|
||||
var Type = require('./Type');
|
||||
|
||||
var inspect = require('object-inspect');
|
||||
|
||||
// https://262.ecma-international.org/8.0/#sec-ordinarytoprimitive
|
||||
|
||||
module.exports = function OrdinaryToPrimitive(O, hint) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: Type(O) is not Object');
|
||||
}
|
||||
if (/* Type(hint) !== 'String' || */ hint !== 'string' && hint !== 'number') {
|
||||
throw new $TypeError('Assertion failed: `hint` must be "string" or "number"');
|
||||
}
|
||||
|
||||
var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
|
||||
|
||||
for (var i = 0; i < methodNames.length; i += 1) {
|
||||
var name = methodNames[i];
|
||||
var method = Get(O, name);
|
||||
if (IsCallable(method)) {
|
||||
var result = Call(method, O);
|
||||
if (Type(result) !== 'Object') {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new $TypeError('No primitive value for ' + inspect(O));
|
||||
};
|
||||
17
VISUALIZACION/node_modules/es-abstract/2018/PromiseResolve.js
generated
vendored
Executable file
17
VISUALIZACION/node_modules/es-abstract/2018/PromiseResolve.js
generated
vendored
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
var callBind = require('call-bind');
|
||||
|
||||
var $resolve = GetIntrinsic('%Promise.resolve%', true);
|
||||
var $PromiseResolve = $resolve && callBind($resolve);
|
||||
|
||||
// https://262.ecma-international.org/9.0/#sec-promise-resolve
|
||||
|
||||
module.exports = function PromiseResolve(C, x) {
|
||||
if (!$PromiseResolve) {
|
||||
throw new SyntaxError('This environment does not support Promises.');
|
||||
}
|
||||
return $PromiseResolve(C, x);
|
||||
};
|
||||
|
||||
48
VISUALIZACION/node_modules/es-abstract/2018/QuoteJSONString.js
generated
vendored
Executable file
48
VISUALIZACION/node_modules/es-abstract/2018/QuoteJSONString.js
generated
vendored
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
var forEach = require('../helpers/forEach');
|
||||
|
||||
var $charCodeAt = callBound('String.prototype.charCodeAt');
|
||||
var $strSplit = callBound('String.prototype.split');
|
||||
|
||||
var Type = require('./Type');
|
||||
var UnicodeEscape = require('./UnicodeEscape');
|
||||
|
||||
var has = require('has');
|
||||
|
||||
// https://262.ecma-international.org/9.0/#sec-quotejsonstring
|
||||
|
||||
var escapes = {
|
||||
'\u0008': '\\b',
|
||||
'\u0009': '\\t',
|
||||
'\u000A': '\\n',
|
||||
'\u000C': '\\f',
|
||||
'\u000D': '\\r',
|
||||
'\u0022': '\\"',
|
||||
'\u005c': '\\\\'
|
||||
};
|
||||
|
||||
module.exports = function QuoteJSONString(value) {
|
||||
if (Type(value) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: `value` must be a String');
|
||||
}
|
||||
var product = '"';
|
||||
if (value) {
|
||||
forEach($strSplit(value), function (C) {
|
||||
if (has(escapes, C)) {
|
||||
product += escapes[C];
|
||||
} else if ($charCodeAt(C, 0) < 0x20) {
|
||||
product += UnicodeEscape(C);
|
||||
} else {
|
||||
product += C;
|
||||
}
|
||||
});
|
||||
}
|
||||
product += '"';
|
||||
return product;
|
||||
};
|
||||
74
VISUALIZACION/node_modules/es-abstract/2018/RawBytesToNumber.js
generated
vendored
Executable file
74
VISUALIZACION/node_modules/es-abstract/2018/RawBytesToNumber.js
generated
vendored
Executable file
|
|
@ -0,0 +1,74 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $RangeError = GetIntrinsic('%RangeError%');
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var $charAt = callBound('String.prototype.charAt');
|
||||
var $reverse = callBound('Array.prototype.reverse');
|
||||
var $slice = callBound('Array.prototype.slice');
|
||||
|
||||
var hasOwnProperty = require('./HasOwnProperty');
|
||||
var IsArray = require('./IsArray');
|
||||
var Type = require('./Type');
|
||||
|
||||
var bytesAsFloat32 = require('../helpers/bytesAsFloat32');
|
||||
var bytesAsFloat64 = require('../helpers/bytesAsFloat64');
|
||||
var bytesAsInteger = require('../helpers/bytesAsInteger');
|
||||
var every = require('../helpers/every');
|
||||
var isByteValue = require('../helpers/isByteValue');
|
||||
|
||||
var keys = require('object-keys');
|
||||
|
||||
// https://262.ecma-international.org/8.0/#table-50
|
||||
var TypeToSizes = {
|
||||
__proto__: null,
|
||||
Int8: 1,
|
||||
Uint8: 1,
|
||||
Uint8C: 1,
|
||||
Int16: 2,
|
||||
Uint16: 2,
|
||||
Int32: 4,
|
||||
Uint32: 4,
|
||||
Float32: 4,
|
||||
Float64: 8
|
||||
};
|
||||
|
||||
// https://262.ecma-international.org/8.0/#sec-rawbytestonumber
|
||||
|
||||
module.exports = function RawBytesToNumber(type, rawBytes, isLittleEndian) {
|
||||
if (typeof type !== 'string' || !hasOwnProperty(TypeToSizes, type)) {
|
||||
throw new $TypeError('Assertion failed: `type` must be a TypedArray element type: ' + keys(TypeToSizes));
|
||||
}
|
||||
if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) {
|
||||
throw new $TypeError('Assertion failed: `rawBytes` must be an Array of bytes');
|
||||
}
|
||||
if (Type(isLittleEndian) !== 'Boolean') {
|
||||
throw new $TypeError('Assertion failed: `isLittleEndian` must be a Boolean');
|
||||
}
|
||||
|
||||
var elementSize = TypeToSizes[type]; // step 1
|
||||
|
||||
if (rawBytes.length !== elementSize) {
|
||||
// this assertion is not in the spec, but it'd be an editorial error if it were ever violated
|
||||
throw new $RangeError('Assertion failed: `rawBytes` must have a length of ' + elementSize + ' for type ' + type);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
rawBytes = $slice(rawBytes, 0, elementSize);
|
||||
if (!isLittleEndian) {
|
||||
$reverse(rawBytes); // step 2
|
||||
}
|
||||
|
||||
if (type === 'Float32') { // step 3
|
||||
return bytesAsFloat32(rawBytes);
|
||||
}
|
||||
|
||||
if (type === 'Float64') { // step 4
|
||||
return bytesAsFloat64(rawBytes);
|
||||
}
|
||||
|
||||
return bytesAsInteger(rawBytes, elementSize, $charAt(type, 0) === 'U', false);
|
||||
};
|
||||
21
VISUALIZACION/node_modules/es-abstract/2018/RegExpCreate.js
generated
vendored
Executable file
21
VISUALIZACION/node_modules/es-abstract/2018/RegExpCreate.js
generated
vendored
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $RegExp = GetIntrinsic('%RegExp%');
|
||||
|
||||
// var RegExpAlloc = require('./RegExpAlloc');
|
||||
// var RegExpInitialize = require('./RegExpInitialize');
|
||||
var ToString = require('./ToString');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-regexpcreate
|
||||
|
||||
module.exports = function RegExpCreate(P, F) {
|
||||
// var obj = RegExpAlloc($RegExp);
|
||||
// return RegExpInitialize(obj, P, F);
|
||||
|
||||
// covers spec mechanics; bypass regex brand checking
|
||||
var pattern = typeof P === 'undefined' ? '' : ToString(P);
|
||||
var flags = typeof F === 'undefined' ? '' : ToString(F);
|
||||
return new $RegExp(pattern, flags);
|
||||
};
|
||||
32
VISUALIZACION/node_modules/es-abstract/2018/RegExpExec.js
generated
vendored
Executable file
32
VISUALIZACION/node_modules/es-abstract/2018/RegExpExec.js
generated
vendored
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var regexExec = require('call-bind/callBound')('RegExp.prototype.exec');
|
||||
|
||||
var Call = require('./Call');
|
||||
var Get = require('./Get');
|
||||
var IsCallable = require('./IsCallable');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-regexpexec
|
||||
|
||||
module.exports = function RegExpExec(R, S) {
|
||||
if (Type(R) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: `R` must be an Object');
|
||||
}
|
||||
if (Type(S) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: `S` must be a String');
|
||||
}
|
||||
var exec = Get(R, 'exec');
|
||||
if (IsCallable(exec)) {
|
||||
var result = Call(exec, R, [S]);
|
||||
if (result === null || Type(result) === 'Object') {
|
||||
return result;
|
||||
}
|
||||
throw new $TypeError('"exec" method must return `null` or an Object');
|
||||
}
|
||||
return regexExec(R, S);
|
||||
};
|
||||
3
VISUALIZACION/node_modules/es-abstract/2018/RequireObjectCoercible.js
generated
vendored
Executable file
3
VISUALIZACION/node_modules/es-abstract/2018/RequireObjectCoercible.js
generated
vendored
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = require('../5/CheckObjectCoercible');
|
||||
13
VISUALIZACION/node_modules/es-abstract/2018/SameValue.js
generated
vendored
Executable file
13
VISUALIZACION/node_modules/es-abstract/2018/SameValue.js
generated
vendored
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
'use strict';
|
||||
|
||||
var $isNaN = require('../helpers/isNaN');
|
||||
|
||||
// http://262.ecma-international.org/5.1/#sec-9.12
|
||||
|
||||
module.exports = function SameValue(x, y) {
|
||||
if (x === y) { // 0 === -0, but they are not identical.
|
||||
if (x === 0) { return 1 / x === 1 / y; }
|
||||
return true;
|
||||
}
|
||||
return $isNaN(x) && $isNaN(y);
|
||||
};
|
||||
16
VISUALIZACION/node_modules/es-abstract/2018/SameValueNonNumber.js
generated
vendored
Executable file
16
VISUALIZACION/node_modules/es-abstract/2018/SameValueNonNumber.js
generated
vendored
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var SameValue = require('./SameValue');
|
||||
|
||||
// https://262.ecma-international.org/7.0/#sec-samevaluenonnumber
|
||||
|
||||
module.exports = function SameValueNonNumber(x, y) {
|
||||
if (typeof x === 'number' || typeof x !== typeof y) {
|
||||
throw new $TypeError('SameValueNonNumber requires two non-number values of the same type.');
|
||||
}
|
||||
return SameValue(x, y);
|
||||
};
|
||||
9
VISUALIZACION/node_modules/es-abstract/2018/SameValueZero.js
generated
vendored
Executable file
9
VISUALIZACION/node_modules/es-abstract/2018/SameValueZero.js
generated
vendored
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
'use strict';
|
||||
|
||||
var $isNaN = require('../helpers/isNaN');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-samevaluezero
|
||||
|
||||
module.exports = function SameValueZero(x, y) {
|
||||
return (x === y) || ($isNaN(x) && $isNaN(y));
|
||||
};
|
||||
14
VISUALIZACION/node_modules/es-abstract/2018/SecFromTime.js
generated
vendored
Executable file
14
VISUALIZACION/node_modules/es-abstract/2018/SecFromTime.js
generated
vendored
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
'use strict';
|
||||
|
||||
var floor = require('./floor');
|
||||
var modulo = require('./modulo');
|
||||
|
||||
var timeConstants = require('../helpers/timeConstants');
|
||||
var msPerSecond = timeConstants.msPerSecond;
|
||||
var SecondsPerMinute = timeConstants.SecondsPerMinute;
|
||||
|
||||
// https://262.ecma-international.org/5.1/#sec-15.9.1.10
|
||||
|
||||
module.exports = function SecFromTime(t) {
|
||||
return modulo(floor(t / msPerSecond), SecondsPerMinute);
|
||||
};
|
||||
47
VISUALIZACION/node_modules/es-abstract/2018/Set.js
generated
vendored
Executable file
47
VISUALIZACION/node_modules/es-abstract/2018/Set.js
generated
vendored
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
var SameValue = require('./SameValue');
|
||||
var Type = require('./Type');
|
||||
|
||||
// IE 9 does not throw in strict mode when writability/configurability/extensibility is violated
|
||||
var noThrowOnStrictViolation = (function () {
|
||||
try {
|
||||
delete [].length;
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}());
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw
|
||||
|
||||
module.exports = function Set(O, P, V, Throw) {
|
||||
if (Type(O) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: `O` must be an Object');
|
||||
}
|
||||
if (!IsPropertyKey(P)) {
|
||||
throw new $TypeError('Assertion failed: `P` must be a Property Key');
|
||||
}
|
||||
if (Type(Throw) !== 'Boolean') {
|
||||
throw new $TypeError('Assertion failed: `Throw` must be a Boolean');
|
||||
}
|
||||
if (Throw) {
|
||||
O[P] = V; // eslint-disable-line no-param-reassign
|
||||
if (noThrowOnStrictViolation && !SameValue(O[P], V)) {
|
||||
throw new $TypeError('Attempted to assign to readonly property.');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
O[P] = V; // eslint-disable-line no-param-reassign
|
||||
return noThrowOnStrictViolation ? SameValue(O[P], V) : true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue