1.0.0 • Published 7 years ago

calculatejs v1.0.0

Weekly downloads
7
License
MIT
Repository
github
Last release
7 years ago

calculate

以链式操作的形式解决js数字运算的精度问题

Install

npm install calculate

Usage

正常使用加减乘除

// ...
var ca = new Calc()
ca.plus(1).minus(2).multiple(4).divide(2)
console.log(ca.val())

Note: new Calc(option) 支持参数配置 value-初始值

使用表达式解析

// ...
var ca = new Calc()
ca.formul('1+2*4/2')
console.log(ca.val())

License

MIT

1.0.0

7 years ago