mirror of
https://github.com/cloudflare/wrangler-action.git
synced 2024-11-26 19:54:46 +01:00
15 lines
377 B
JavaScript
15 lines
377 B
JavaScript
'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;
|
|
};
|