Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/es-abstract/helpers/isInteger.js
r0c6b92a r79a0317 1 1 'use strict'; 2 2 3 var GetIntrinsic = require('get-intrinsic'); 4 5 var $abs = GetIntrinsic('%Math.abs%'); 6 var $floor = GetIntrinsic('%Math.floor%'); 7 8 var $isNaN = require('./isNaN'); 9 var $isFinite = require('./isFinite'); 10 11 module.exports = function isInteger(argument) { 12 if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) { 13 return false; 14 } 15 var absValue = $abs(argument); 16 return $floor(absValue) === absValue; 17 }; 18 3 // TODO, semver-major: delete 4 module.exports = require('math-intrinsics/isInteger');
Note:
See TracChangeset
for help on using the changeset viewer.