0.2.0 • Published 6 years ago
babel-plugin-pre-calculate-number v0.2.0
Babel-plugin-pre-calculate-number
Before:
const result = 1 + 2 + 3 + 4 + 5;
const area = Math.PI * 2 ** 2;
const oneDaySeconds = 3600 * 1000 * 24;
const minAge = Math.min(12, 18, 22);
setTimeout(function() {
// do something
}, 1000 * 2);
After:
const result = 15;
const area = 12.566370614359172;
const oneDaySeconds = 86400000;
const minAge = 12;
setTimeout(function() {
// do something
}, 2000);
Contributors
Axetroy💻 🔌 ⚠️ 🐛 🎨 |
---|
License
The MIT License