Internet-programming_PIbd-2.../Library/node_modules/es-abstract/2023/IsIntegralNumber.js

16 lines
377 B
JavaScript
Raw Normal View History

2023-11-30 18:35:42 +04:00
'use strict';
var truncate = require('./truncate');
var Type = require('./Type');
var $isFinite = require('../helpers/isFinite');
// https://262.ecma-international.org/14.0/#sec-isintegralnumber
module.exports = function IsIntegralNumber(argument) {
if (Type(argument) !== 'Number' || !$isFinite(argument)) {
return false;
}
return truncate(argument) === argument;
};