roundto

0.0.2 • Public • Published

roundto

Rounds a number to specified number of decimal places

Installation

npm install roundto

Examples

The following examples show you how to use roundto

Usage

var roundto = require('roundto');
 
// round to 2 deicmal places
var rounded = roundto(12.1234,2);
=> 12.12
 
// round to 3 decimal places using the ceiling method
var rounded = roundto(12.1234,3,'ceiling');
=> 12.124

Running Tests

$ npm test

Readme

Keywords

Package Sidebar

Install

npm i roundto

Weekly Downloads

11

Version

0.0.2

License

none

Last publish

Collaborators

  • mbayfield