@types/money-math
TypeScript icon, indicating that this package has built-in type declarations

2.5.5 • Public • Published

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

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/money-math

Weekly Downloads

3,814

Version

2.5.5

License

MIT

Unpacked Size

4.7 kB

Total Files

5

Last publish

Collaborators

  • types