The isFinite()
function from lodash
checks if the value is a finite primitive number or not. It returns true
if the value is a finite primitive number, otherwise, it returns false
.
To use the isFinite()
function from lodash
, first install the library using npm
command:
index.tsx19 chars2 lines
Then, import the function and use it in your code:
index.tsx235 chars8 lines
In the code above, we imported the isFinite()
function from lodash
, and passed different values to this function to check if the value is a finite primitive number or not.
Note that isFinite()
function from lodash
is a utility function that can be used with different data types, not just with numbers.
gistlibby LogSnag