25 lines
444 B
JavaScript
25 lines
444 B
JavaScript
// Module ID: 4424
|
|
// Function ID: 4425
|
|
// Name: isFinite
|
|
// Dependencies: [572]
|
|
|
|
// Module 4424 (isFinite)
|
|
import isNaN from "isNaN" /* 572 */;
|
|
|
|
|
|
export default function isFinite(num) {
|
|
let tmp = typeof num === "number";
|
|
if (typeof num !== "number") {
|
|
tmp = typeof num === "bigint";
|
|
}
|
|
if (tmp) {
|
|
tmp = !isNaN(num);
|
|
}
|
|
if (tmp) {
|
|
tmp = num !== Infinity;
|
|
}
|
|
if (tmp) {
|
|
tmp = num !== -Infinity;
|
|
}
|
|
return tmp;
|
|
};
|