Changeset 79a0317 for imaps-frontend/node_modules/es-abstract/5
- Timestamp:
- 01/21/25 03:08:24 (3 days ago)
- Branches:
- main
- Parents:
- 0c6b92a
- Location:
- imaps-frontend/node_modules/es-abstract/5
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/5/AbstractEqualityComparison.js
r0c6b92a r79a0317 5 5 var Type = require('./Type'); 6 6 7 var isObject = require('../helpers/isObject'); 8 7 9 // https://262.ecma-international.org/5.1/#sec-11.9.3 8 10 9 11 module.exports = function AbstractEqualityComparison(x, y) { 10 var xType = Type(x); 11 var yType = Type(y); 12 if (xType === yType) { 12 if (Type(x) === Type(y)) { 13 13 return x === y; // ES6+ specified this shortcut anyways. 14 14 } … … 16 16 return true; 17 17 } 18 if ( xType === 'Number' && yType === 'String') {18 if (typeof x === 'number' && typeof y === 'string') { 19 19 return AbstractEqualityComparison(x, ToNumber(y)); 20 20 } 21 if ( xType === 'String' && yType === 'Number') {21 if (typeof x === 'string' && typeof y === 'number') { 22 22 return AbstractEqualityComparison(ToNumber(x), y); 23 23 } 24 if ( xType === 'Boolean') {24 if (typeof x === 'boolean') { 25 25 return AbstractEqualityComparison(ToNumber(x), y); 26 26 } 27 if ( yType === 'Boolean') {27 if (typeof y === 'boolean') { 28 28 return AbstractEqualityComparison(x, ToNumber(y)); 29 29 } 30 if (( xType === 'String' || xType === 'Number') && yType === 'Object') {30 if ((typeof x === 'string' || typeof x === 'number') && isObject(y)) { 31 31 return AbstractEqualityComparison(x, ToPrimitive(y)); 32 32 } 33 if ( xType === 'Object' && (yType === 'String' || yType === 'Number')) {33 if (isObject(x) && (typeof y === 'string' || typeof y === 'number')) { 34 34 return AbstractEqualityComparison(ToPrimitive(x), y); 35 35 } -
imaps-frontend/node_modules/es-abstract/5/AbstractRelationalComparison.js
r0c6b92a r79a0317 5 5 var $Number = GetIntrinsic('%Number%'); 6 6 var $TypeError = require('es-errors/type'); 7 var $isNaN = require('math-intrinsics/isNaN'); 8 var $isFinite = require('math-intrinsics/isFinite'); 7 9 8 var $isNaN = require('../helpers/isNaN');9 var $isFinite = require('../helpers/isFinite');10 10 var isPrefixOf = require('../helpers/isPrefixOf'); 11 11 -
imaps-frontend/node_modules/es-abstract/5/Canonicalize.js
r0c6b92a r79a0317 3 3 var $TypeError = require('es-errors/type'); 4 4 5 var callBound = require('call-b ind/callBound');5 var callBound = require('call-bound'); 6 6 7 7 var $charCodeAt = callBound('String.prototype.charCodeAt'); -
imaps-frontend/node_modules/es-abstract/5/MakeDate.js
r0c6b92a r79a0317 1 1 'use strict'; 2 2 3 var $isFinite = require('../helpers/isFinite'); 3 var $isFinite = require('math-intrinsics/isFinite'); 4 4 5 var msPerDay = require('../helpers/timeConstants').msPerDay; 5 6 -
imaps-frontend/node_modules/es-abstract/5/MakeDay.js
r0c6b92a r79a0317 5 5 var $DateUTC = GetIntrinsic('%Date.UTC%'); 6 6 7 var $isFinite = require(' ../helpers/isFinite');7 var $isFinite = require('math-intrinsics/isFinite'); 8 8 9 9 var DateFromTime = require('./DateFromTime'); -
imaps-frontend/node_modules/es-abstract/5/MakeTime.js
r0c6b92a r79a0317 1 1 'use strict'; 2 2 3 var $isFinite = require('../helpers/isFinite'); 3 var $isFinite = require('math-intrinsics/isFinite'); 4 4 5 var timeConstants = require('../helpers/timeConstants'); 5 6 var msPerSecond = timeConstants.msPerSecond; -
imaps-frontend/node_modules/es-abstract/5/MonthFromTime.js
r0c6b92a r79a0317 1 1 'use strict'; 2 3 var $RangeError = require('es-errors/range'); 2 4 3 5 var DayWithinYear = require('./DayWithinYear'); … … 45 47 return 11; 46 48 } 49 50 throw new $RangeError('Assertion failed: `day` is out of range'); 47 51 }; -
imaps-frontend/node_modules/es-abstract/5/SameValue.js
r0c6b92a r79a0317 1 1 'use strict'; 2 2 3 var $isNaN = require(' ../helpers/isNaN');3 var $isNaN = require('math-intrinsics/isNaN'); 4 4 5 5 // http://262.ecma-international.org/5.1/#sec-9.12 -
imaps-frontend/node_modules/es-abstract/5/StrictEqualityComparison.js
r0c6b92a r79a0317 6 6 7 7 module.exports = function StrictEqualityComparison(x, y) { 8 var xType = Type(x); 9 var yType = Type(y); 10 if (xType !== yType) { 8 if (Type(x) !== Type(y)) { 11 9 return false; 12 10 } 13 if ( xType === 'Undefined' || xType === 'Null') {11 if (typeof x === 'undefined' || x === null) { 14 12 return true; 15 13 } -
imaps-frontend/node_modules/es-abstract/5/TimeClip.js
r0c6b92a r79a0317 4 4 5 5 var $Date = GetIntrinsic('%Date%'); 6 var $Number = GetIntrinsic('%Number%');7 6 8 var $isFinite = require('../helpers/isFinite'); 7 var $isFinite = require('math-intrinsics/isFinite'); 8 var abs = require('math-intrinsics/abs'); 9 9 10 var abs = require('./abs');11 10 var ToNumber = require('./ToNumber'); 12 11 … … 17 16 return NaN; 18 17 } 19 return $Number(new $Date(ToNumber(time)));18 return +new $Date(ToNumber(time)); 20 19 }; 21 20 -
imaps-frontend/node_modules/es-abstract/5/ToInteger.js
r0c6b92a r79a0317 1 1 'use strict'; 2 2 3 var abs = require('./abs');4 var floor = require('./floor');5 3 var ToNumber = require('./ToNumber'); 6 4 7 var $isNaN = require('../helpers/isNaN'); 8 var $isFinite = require('../helpers/isFinite'); 9 var $sign = require('../helpers/sign'); 5 var abs = require('math-intrinsics/abs'); 6 var floor = require('math-intrinsics/floor'); 7 var $isNaN = require('math-intrinsics/isNaN'); 8 var $isFinite = require('math-intrinsics/isFinite'); 9 var $sign = require('math-intrinsics/sign'); 10 10 11 11 // http://262.ecma-international.org/5.1/#sec-9.4 -
imaps-frontend/node_modules/es-abstract/5/ToNumber.js
r0c6b92a r79a0317 3 3 var ToPrimitive = require('./ToPrimitive'); 4 4 5 var callBound = require('call-b ind/callBound');5 var callBound = require('call-bound'); 6 6 7 7 var $replace = callBound('String.prototype.replace'); … … 11 11 var isNonDecimal = safeRegexTester(/^0[ob]|^[+-]0x/); 12 12 13 var $Number = Number; 14 13 15 // http://262.ecma-international.org/5.1/#sec-9.3 14 16 15 17 module.exports = function ToNumber(value) { 16 var prim = ToPrimitive(value, Number);18 var prim = ToPrimitive(value, $Number); 17 19 if (typeof prim !== 'string') { 18 return +prim; // eslint-disable-line no-implicit-coercion20 return $Number(prim); 19 21 } 20 22 … … 29 31 } 30 32 31 return +trimmed; // eslint-disable-line no-implicit-coercion33 return +trimmed; 32 34 }; -
imaps-frontend/node_modules/es-abstract/5/ToPropertyDescriptor.js
r0c6b92a r79a0317 5 5 var $TypeError = require('es-errors/type'); 6 6 7 var Type = require('./Type');7 var IsCallable = require('./IsCallable'); 8 8 var ToBoolean = require('./ToBoolean'); 9 var IsCallable = require('./IsCallable'); 9 10 var isObject = require('../helpers/isObject'); 10 11 11 12 // https://262.ecma-international.org/5.1/#sec-8.10.5 12 13 13 14 module.exports = function ToPropertyDescriptor(Obj) { 14 if ( Type(Obj) !== 'Object') {15 if (!isObject(Obj)) { 15 16 throw new $TypeError('ToPropertyDescriptor requires an object'); 16 17 } -
imaps-frontend/node_modules/es-abstract/5/ToUint16.js
r0c6b92a r79a0317 1 1 'use strict'; 2 2 3 var abs = require('./abs');4 var floor = require('./floor');5 3 var modulo = require('./modulo'); 6 4 var ToNumber = require('./ToNumber'); 7 5 8 var $isNaN = require('../helpers/isNaN'); 9 var $isFinite = require('../helpers/isFinite'); 10 var $sign = require('../helpers/sign'); 6 var abs = require('math-intrinsics/abs'); 7 var floor = require('math-intrinsics/floor'); 8 var $isNaN = require('math-intrinsics/isNaN'); 9 var $isFinite = require('math-intrinsics/isFinite'); 10 var $sign = require('math-intrinsics/sign'); 11 11 12 12 // http://262.ecma-international.org/5.1/#sec-9.7 -
imaps-frontend/node_modules/es-abstract/5/Type.js
r0c6b92a r79a0317 1 1 'use strict'; 2 3 var isObject = require('../helpers/isObject'); 2 4 3 5 // https://262.ecma-international.org/5.1/#sec-8 … … 10 12 return 'Undefined'; 11 13 } 12 if ( typeof x === 'function' || typeof x === 'object') {14 if (isObject(x)) { 13 15 return 'Object'; 14 16 } -
imaps-frontend/node_modules/es-abstract/5/YearFromTime.js
r0c6b92a r79a0317 5 5 var $Date = GetIntrinsic('%Date%'); 6 6 7 var callBound = require('call-b ind/callBound');7 var callBound = require('call-bound'); 8 8 9 9 var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear'); -
imaps-frontend/node_modules/es-abstract/5/abs.js
r0c6b92a r79a0317 1 1 'use strict'; 2 2 3 var GetIntrinsic = require('get-intrinsic'); 4 5 var $abs = GetIntrinsic('%Math.abs%'); 3 var $abs = require('math-intrinsics/abs'); 6 4 7 5 // http://262.ecma-international.org/5.1/#sec-5.2 -
imaps-frontend/node_modules/es-abstract/5/floor.js
r0c6b92a r79a0317 2 2 3 3 // var modulo = require('./modulo'); 4 var $floor = Math.floor;4 var $floor = require('math-intrinsics/floor'); 5 5 6 6 // http://262.ecma-international.org/5.1/#sec-5.2
Note:
See TracChangeset
for help on using the changeset viewer.