安装
npm install number-precision --save
使用
import NP from 'number-precision';
方法
NP.plus(num1, num2, num3, ...) // addition, num + num2 + num3, two numbers is required at least.
NP.minus(num1, num2, num3, ...) // subtraction, num1 - num2 - num3
NP.times(num1, num2, num3, ...) // multiplication, num1 * num2 * num3
NP.divide(num1, num2, num3, ...) // division, num1 / num2 / num3
想知道更多可以查看文档
https://developer.aliyun.com/mirror/npm/package/number-precision