round10
v1.0.3
Published
Brings decimal adjustment to the Math object.
Maintainers
Readme
Inspired by Decimal rounding polyfill by MDN.
Installation
Install using npm:
$ npm install round10Usage
Use in your project:
$ npm install --save round10and in your code:
var round10 = require('round10').round10;
round10(55.55, -1); // 55.6Optionally, you may use the polyfill which extends the global Math object:
require('round10').polyfill();
Math.round10(55.55, -1); // 55.6Check out the code
$ git clone [email protected]:jhohlfeld/round10.git
$ cd round10
$ npm installTest using mocha:
$ npm install -g mocha
$ mocha test/test.js