mirror of
https://github.com/joelwmale/webhook-action.git
synced 2024-12-01 11:55:20 +01:00
1ada95e04a
- Convert project to Javascript/Typescript - Allow custom headers to be passed in (optional) - Allow body to be optional
21 lines
514 B
JavaScript
Generated
21 lines
514 B
JavaScript
Generated
'use strict';
|
|
|
|
var GetIntrinsic = require('../GetIntrinsic');
|
|
|
|
var $Math = GetIntrinsic('%Math%');
|
|
|
|
var $floor = $Math.floor;
|
|
var $abs = $Math.abs;
|
|
|
|
var $isNaN = require('../helpers/isNaN');
|
|
var $isFinite = require('../helpers/isFinite');
|
|
|
|
// https://www.ecma-international.org/ecma-262/6.0/#sec-isinteger
|
|
|
|
module.exports = function IsInteger(argument) {
|
|
if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {
|
|
return false;
|
|
}
|
|
var abs = $abs(argument);
|
|
return $floor(abs) === abs;
|
|
};
|