calculatejs
calculate in js
Last updated 2 years ago by hansenlee .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install calculatejs 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

1 Versions

  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 4
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |