You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Andrea Gaertner 668e16c315 Einkaufsliste application_liste hinzugefügt 3 years ago
..
test Einkaufsliste application_liste hinzugefügt 3 years ago
.npmignore Einkaufsliste application_liste hinzugefügt 3 years ago
README.md Einkaufsliste application_liste hinzugefügt 3 years ago
package.json Einkaufsliste application_liste hinzugefügt 3 years ago
round10.js Einkaufsliste application_liste hinzugefügt 3 years ago

README.md

Inspired by Decimal rounding polyfill by MDN.

Installation

Install using npm:

$ npm install round10

Usage

Use in your project:

$ npm install --save round10

and in your code:

var round10 = require('round10').round10;
round10(55.55, -1); // 55.6

Optionally, you may use the polyfill which extends the global Math object:

require('round10').polyfill();
Math.round10(55.55, -1); // 55.6

Check out the code

$ git clone git@github.com:jhohlfeld/round10.git
$ cd round10
$ npm install

Test using mocha:

$ npm install -g mocha
$ mocha test/test.js