So JavaScript integers are interally 64-bit floating values and hence can precisely support values from -253 to +253 (-9,007,199,254,740,992 to +9,007,199,254,740,992).
You can read all about it in our very interesting thread: What is JavaScript's Max Int? What's the highest Integer value a Number can go to without losing precision?
In my project I need 64-bit offsets into very large files. I can make these by combining a high and low pair of 32-bit values. I don't need the full 64-bit range so JavaScript's limits are fine.
But I'm not sure how to sanity-check that a given pair of 32-bit values wouldn't result in a number outside JavaScript's range.
How could I check against this? I assume it might be trickiest for numbers just outside this range.