fasttime / JScrewIt

Write any JavaScript with six characters: ! ( ) + [ ]
https://jscrew.it
ISC License
161 stars 13 forks source link

Usage of `BigInt.prototype.toString()` #45

Open claybiockiller opened 1 year ago

claybiockiller commented 1 year ago

Currently, only Number.prototype.toString() is used in the optimizer, but it has a disadvantage: it would be limited by MAX_SAFE_INTEGER. BigInt.prototype.toString() is not affected by that. To get number in BigInt type, you can just call "return "+number written in string+"n" in Function().

fasttime commented 1 year ago

Thanks! This should indeed work in all new browsers.