_.isFinite

Converts value to a finite number.

  1. // Lodash
  2. console.log(_.isFinite('3'))
  3. // output: false
  4. console.log(_.isFinite(3))
  5. // output: true
  6.  
  7. // Native
  8. console.log(Number.isFinite('3'))
  9. // output: false
  10. console.log(Number.isFinite(3))
  11. // output: true

Browser Support for Number.isFinite()

ChromeEdgeFirefoxIEOperaSafari
19.0 ✔16.0 ✔15.0 ✔9.0 ✔