the-forest/client/node_modules/es-abstract/2024/IsIntegralNumber.js

15 lines
348 B
JavaScript
Raw Normal View History

2024-09-17 20:35:18 -04:00
'use strict';
var truncate = require('./truncate');
var $isFinite = require('../helpers/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;
};