# @types/money-math

> TypeScript definitions for money-math

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

## Install

```sh
npm install @types/money-math
pnpm add @types/money-math
yarn add @types/money-math
bun add @types/money-math
```

## 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.5.5 |
| Published | 2023-11-07 |
| First published | 2018-08-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51432 |
| Maintainers | types |

## Links

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

## Recent versions

- 2.5.5 (latest) — 2023-11-07
- 2.5.2 (ts3.6) — 2021-07-30
- 2.5.1 (ts3.5) — 2021-05-11
- 2.5.0 (ts2.0) — 2018-08-29
- 2.5.4 — 2023-10-18
- 2.5.3 — 2023-09-27

## README

# Installation
> `npm install --save @types/money-math`

# Summary
This package contains type definitions for money-math (https://github.com/ikr/money-math#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/money-math.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/money-math/index.d.ts)
````ts
export as namespace Money;

export function add(a: string, b: string): string;
export function amountToCents(value: string): string;
export function centsToAmount(value: string): string;
export function centsToAmount(): undefined;
export function subtract(a: string, b: string): string;
export function mul(a: string, b: string): string;
export function div(a: string, b: string): string;
export function percent(a: string, b: string): string;
export function cmp(a: string, b: string): 0 | number;
export function integralPart(value: string): string;
export function isEqual(a: string, b: string): boolean;
export function isZero(value: string): boolean;
export function isNegative(value: string): boolean;
export function isPositive(value: string): boolean;
export function floatToAmount(value: number): string;
export function format(
    currency: "CHF" | "CNY" | "EUR" | "GBP" | "JPY" | "LTL" | "PLN" | "SEK" | "SKK" | "UAH" | "USD" | string,
    value: string,
): string;
export function roundUpTo5Cents(value: string): string;
export function roundTo5Cents(value: string): string;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [taoqf](https://github.com/taoqf).

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