babel-plugin-math-precision

0.1.4 • Public • Published

处理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);

Readme

Keywords

none

Package Sidebar

Install

npm i babel-plugin-math-precision

Weekly Downloads

0

Version

0.1.4

License

ISC

Unpacked Size

6.94 kB

Total Files

6

Last publish

Collaborators

  • crisiron