The Number isNaN() static method method returns true if the value is NaN and the type is a Number. The global isNaN() function first converts the value to a Number and then tests it.
console.log(Number.isSafeInteger(123));
// true
console.log(Number.isSafeInteger(-100000000));
// true
console.log(Number.isSafeInteger(0.5));
// false