isInt
Determine if a value is an int
43 bytes
since v12.1.0
Usage
Pass in a value and get a boolean telling you if the value is an int.
import * as import _
_ from 'radashi'
import _
_.const isInt: (value: unknown) => value is number
Literally just Number.isInteger with a better type.
isInt(12) // => trueimport _
_.const isInt: (value: unknown) => value is number
Literally just Number.isInteger with a better type.
isInt(12.233) // => falseimport _
_.const isInt: (value: unknown) => value is number
Literally just Number.isInteger with a better type.
isInt('hello') // => false