UNPKG

math-intrinsics

Version:

ES Math-related intrinsics and helpers, robustly cached.

13 lines (9 loc) 262 B
'use strict'; var $isNaN = require('./isNaN'); /** @type {import('./isFinite')} */ module.exports = function isFinite(x) { return (typeof x === 'number' || typeof x === 'bigint') && !$isNaN(x) && x !== Infinity && x !== -Infinity; };