# round-precision

> Round a number to a specified decimal precision

Latest version **1.0.0** (published 2015-06-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install round-precision
pnpm add round-precision
yarn add round-precision
bun add round-precision
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-06-18 |
| First published | 2015-06-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Ben Drucker |
| Maintainers | bendrucker |
| Keywords | number, round, decimal, precision |

## Links

- npm: https://www.npmjs.com/package/round-precision
- Repository: https://github.com/bendrucker/round-precision
- Homepage: https://github.com/bendrucker/round-precision#readme
- Issues: https://github.com/bendrucker/round-precision/issues
- npm.io page: https://npm.io/package/round-precision

## Dependencies (2)

- [is-finite](https://npm.io/package/is-finite.md) ~1.0.1
- [is-integer](https://npm.io/package/is-integer.md) ~1.0.4

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-06-18

## README

# round-precision [![Build Status](https://travis-ci.org/bendrucker/round-precision.svg?branch=master)](https://travis-ci.org/bendrucker/round-precision)

> Round a number to a specified decimal precision


## Install

```
$ npm install --save round-precision
```


## Usage

```js
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](http://bendrucker.me)

---
_Source: https://npm.io/package/round-precision · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
