round-precision

Round a number to a specified decimal precision

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
round-precision
1.0.09 years ago9 years agoMinified + gzip package size for round-precision in KB

Readme

round-precision Build Status
Round a number to a specified decimal precision

Install

$ npm install --save round-precision

Usage

var roundPrecision = require('round-precision')
roundPrecision(12.34, 1)
//=> 12.3

API

roundPrecision(value, places) -> number

value
Required
Type: number
A finite number to round.
value
Required
Type: number
A non-negative number of integer places.

License

MIT © Ben Drucker