Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/2024/StringToNumber.js
r0c6b92a r79a0317 3 3 var GetIntrinsic = require('get-intrinsic'); 4 4 5 var $Number = GetIntrinsic('%Number%');6 5 var $RegExp = GetIntrinsic('%RegExp%'); 7 6 var $TypeError = require('es-errors/type'); 8 7 var $parseInteger = GetIntrinsic('%parseInt%'); 9 8 10 var callBound = require('call-b ind/callBound');9 var callBound = require('call-bound'); 11 10 var regexTester = require('safe-regex-test'); 12 11 … … 28 27 } 29 28 if (isBinary(argument)) { 30 return $Number($parseInteger($strSlice(argument, 2), 2));29 return +$parseInteger($strSlice(argument, 2), 2); 31 30 } 32 31 if (isOctal(argument)) { 33 return $Number($parseInteger($strSlice(argument, 2), 8));32 return +$parseInteger($strSlice(argument, 2), 8); 34 33 } 35 34 if (hasNonWS(argument) || isInvalidHexLiteral(argument)) { … … 40 39 return StringToNumber(trimmed); 41 40 } 42 return $Number(argument);41 return +argument; 43 42 };
Note:
See TracChangeset
for help on using the changeset viewer.