source: imaps-frontend/node_modules/math-intrinsics/isInteger.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 410 bytes
RevLine 
[79a0317]1'use strict';
2
3var $abs = require('./abs');
4var $floor = require('./floor');
5
6var $isNaN = require('./isNaN');
7var $isFinite = require('./isFinite');
8
9/** @type {import('./isInteger')} */
10module.exports = function isInteger(argument) {
11 if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {
12 return false;
13 }
14 var absValue = $abs(argument);
15 return $floor(absValue) === absValue;
16};
Note: See TracBrowser for help on using the repository browser.