home
This commit is contained in:
parent
a71a3b5593
commit
cb52890889
16657 changed files with 1483086 additions and 1 deletions
18
home/ags/node_modules/es-abstract/helpers/isInteger.js
generated
vendored
Normal file
18
home/ags/node_modules/es-abstract/helpers/isInteger.js
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $abs = GetIntrinsic('%Math.abs%');
|
||||
var $floor = GetIntrinsic('%Math.floor%');
|
||||
|
||||
var $isNaN = require('./isNaN');
|
||||
var $isFinite = require('./isFinite');
|
||||
|
||||
module.exports = function isInteger(argument) {
|
||||
if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {
|
||||
return false;
|
||||
}
|
||||
var absValue = $abs(argument);
|
||||
return $floor(absValue) === absValue;
|
||||
};
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue