Frontend/25_01_07/mai/node_modules/es-abstract/2024/IsIntegralNumber.js
szabomarton 7f4a15b9c3 asd
2025-01-28 11:38:27 +01:00

15 lines
353 B
JavaScript

'use strict';
var truncate = require('./truncate');
var $isFinite = require('math-intrinsics/isFinite');
// https://262.ecma-international.org/14.0/#sec-isintegralnumber
module.exports = function IsIntegralNumber(argument) {
if (typeof argument !== 'number' || !$isFinite(argument)) {
return false;
}
return truncate(argument) === argument;
};