You need Number.isSafeInteger()
In addition, max int limit 2^53 - 1
In addition, you can store data in Float, so you can avoid the problem altogether. If the application needs to know the overflow condition, perhaps post an expression about the problem, there might be a better way to approach it.
source share