# @types/round

> TypeScript definitions for round

Latest version **2.0.3** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/round
pnpm add @types/round
yarn add @types/round
bun add @types/round
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2023-11-07 |
| First published | 2021-05-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/round
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/round
- npm.io page: https://npm.io/package/@types/round

## Recent versions

- 2.0.3 (latest) — 2023-11-07
- 2.0.0 (ts3.5) — 2021-05-11
- 2.0.2 — 2023-10-18
- 2.0.1 — 2023-09-27

## README

# Installation
> `npm install --save @types/round`

# Summary
This package contains type definitions for round (https://github.com/bendrucker/round.js#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/round.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/round/index.d.ts)
````ts
/**
 * Round numbers to the nearest multiple with an optional direction.
 * @param value The value to round.
 * @param multiple The multiple to round to.
 * @param direction If no direction is supplied, the number will be rounded to the nearest direction, defaulting to up if the value is equidistant from the rounded values.
 */
declare function round(value: number, multiple?: number, direction?: round.Direction): number;

declare namespace round {
    type Direction = "up" | "down";

    /**
     * Convenience method for rounding down.
     */
    function down(value: number, multiple?: number): number;

    /**
     * Convenience method for rounding up.
     */
    function up(value: number, multiple?: number): number;
}

export = round;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [Rajas Paranjpe](https://github.com/ChocolateLoverRaj).

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