babel-plugin-pre-calculate-number

0.2.0 • Public • Published

Babel-plugin-pre-calculate-number

Greenkeeper badge Build Status Coverage Status Dependency License Prettier Node npm version Size

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

Readme

Keywords

none

Package Sidebar

Install

npm i babel-plugin-pre-calculate-number

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

128 kB

Total Files

7

Last publish

Collaborators

  • axetroy