API Reference

Returns a boolean of whether or not the input is directly convertible to a number. Useful when APIs may return numbers as strings.

function isNumeric(n: string | number): boolean

// Example:

isNumeric(33) //=> true

isNumeric("4.12") //=> true

isNumeric("hello") //=> false