In most cases for me, i just want to check if string/number that i get is simple number only like this:
0, 1, 500, -1, 1.1, -1.1, 1.1013200 and so on.
And then convert it safely, without getting unexpected results.
What will be correct way to check if string or number is SIMPLE number?
Simple stands for:
- No scientific notations like "1e+30"
- No spaces like " 1"
- No ".1" or "080" and notations like this
- Limit to length that js can handle, convert to and from with same result
- Other stuff that i could forget