UNPKG

@jrc03c/js-math-tools

Version:
8 lines (5 loc) 169 B
import { isNumber } from "../is-number.mjs" function isInteger(x) { return isNumber(x) && (x >= 0 ? Math.floor(x) === x : Math.ceil(x) === x) } export { isInteger }