mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
18 lines
420 B
Plaintext
18 lines
420 B
Plaintext
|
// @flow strict
|
||
|
|
||
|
declare function isInteger(value: mixed): boolean %checks(typeof value ===
|
||
|
'number');
|
||
|
|
||
|
/* eslint-disable no-redeclare */
|
||
|
// $FlowFixMe workaround for: https://github.com/facebook/flow/issues/4441
|
||
|
const isInteger =
|
||
|
Number.isInteger ||
|
||
|
function(value) {
|
||
|
return (
|
||
|
typeof value === 'number' &&
|
||
|
isFinite(value) &&
|
||
|
Math.floor(value) === value
|
||
|
);
|
||
|
};
|
||
|
export default isInteger;
|