Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2021/AbstractRelationalComparison.js
r0c6b92a r79a0317 6 6 var $TypeError = require('es-errors/type'); 7 7 8 var $isNaN = require(' ../helpers/isNaN');8 var $isNaN = require('math-intrinsics/isNaN'); 9 9 10 10 var IsStringPrefix = require('./IsStringPrefix'); … … 43 43 } 44 44 45 var pxType = Type(px);46 var pyType = Type(py);47 45 var nx; 48 46 var ny; 49 if ( pxType === 'BigInt' && pyType === 'String') {47 if (typeof px === 'bigint' && typeof py === 'string') { 50 48 ny = StringToBigInt(py); 51 49 if ($isNaN(ny)) { … … 54 52 return BigIntLessThan(px, ny); 55 53 } 56 if ( pxType === 'String' && pyType === 'BigInt') {54 if (typeof px === 'string' && typeof py === 'bigint') { 57 55 nx = StringToBigInt(px); 58 56 if ($isNaN(nx)) { … … 64 62 nx = ToNumeric(px); 65 63 ny = ToNumeric(py); 66 var nxType = Type(nx); 67 if (nxType === Type(ny)) { 68 return nxType === 'Number' ? NumberLessThan(nx, ny) : BigIntLessThan(nx, ny); 64 if (Type(nx) === Type(ny)) { 65 return typeof nx === 'number' ? NumberLessThan(nx, ny) : BigIntLessThan(nx, ny); 69 66 } 70 67
Note:
See TracChangeset
for help on using the changeset viewer.