Changeset 79a0317 for imaps-frontend/node_modules/es-abstract/5/ToNumber.js
Legend:
- Unmodified
- Added
- Removed
-
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 };
Note:
See TracChangeset
for help on using the changeset viewer.