blob: 5dd022959a382c54e0739e9c6393df1038fe58ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// @flow strict
declare function isFinitePolyfill(
value: mixed,
): boolean %checks(typeof value === 'number');
/* eslint-disable no-redeclare */
// $FlowFixMe[name-already-bound] workaround for: https://github.com/facebook/flow/issues/4441
const isFinitePolyfill =
Number.isFinite ||
function (value) {
return typeof value === 'number' && isFinite(value);
};
export default isFinitePolyfill;
|