What is is-finite?
The is-finite npm package is a simple utility that checks if a given value is a finite number. It is a lightweight alternative to the native Number.isFinite function, providing a straightforward way to determine if a value is a finite number.
Check if a value is finite
This feature allows you to check if a given value is a finite number. The code sample demonstrates checking various values, including a finite number, Infinity, and a string.
const isFinite = require('is-finite');
console.log(isFinite(10)); // true
console.log(isFinite(Infinity)); // false
console.log(isFinite('10')); // false