jonschlinkert / is-number

JavaScript/Node.js utility. Returns `true` if the value is a number or string number. Useful for checking regex match results, user input, parsed strings, etc.
https://github.com/jonschlinkert
MIT License
260 stars 50 forks source link

Test if BigInt instance is a finite number #34

Open omrilotan opened 2 years ago

omrilotan commented 2 years ago

BigInt can represent a value that can be represented by a number or larger. This now checks if it is representing a value that can be represented by a Javascript number.

Disclosure: There's a performance hit for non-string or numbers. Others are obviously not affected