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