0.1.4 • Published 2 years ago

babel-plugin-math-precision v0.1.4

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

处理JS精度的babel插件

  • 安装
npm i -D babel-plugin-math-precision
  • 使用方法

    • babel.rc
    {
      "plugins": ["math-precision"]
    }
    • webpack.config.js
      {
        test: /\.js|x$/,
        loader: 'babel-loader',
        option: {
          plugins: [
            require('babel-plugin-math-precision')
          ]
        }
      }
  • 实例

    // 代码中
    const a = 1 + 2;
    // 打包后
    var { mathPlus } = require("babel-plugin-math-precision/lib/mathCalc.js");
    const a = mathPlus(1, 2);
0.1.2

2 years ago

0.1.1

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.0

2 years ago

0.0.1

2 years ago