pre calculate number expression
MIT License
Before:
const result = 1 + 2 + 3 + 4 + 5;
const area = Math.PI * 2 ** 2;
const oneDaySeconds = 60 * 60 * 24;
const minAge = Math.min(12, 18, 22);
setTimeout(function() {
// do something
}, 1000 * 2);
After:
const result = 15;
const area = 12.566370614359172;
const oneDaySeconds = 86400;
const minAge = 12;
setTimeout(function() {
// do something
}, 2000);
Axetroy |
---|
The MIT License