awesome calculator
introduce
this kit resolve some awful operating problem, like "0.1 + 0.2" etc.
warn
It is implemented with ES6, so you must use it in environment that support ES6
in node
npm install awesome-calculator --savevar cal =
in browser
<script src="https://unpkg.com/awesome-calculator"></script>
API
- mul multiplied operating, you can pass number or string
var cal = require('awesome-calculator')
console.log(cal.mul('12.32', '7'))
- plus plus operating, you can pass number or string
var cal = require('awesome-calculator')
console.log(cal.plus('0.1', '0.2'))