2.5.5 • Published 6 months ago

@types/money-math v2.5.5

Weekly downloads
228
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for money-math 2.5
// Project: https://github.com/ikr/money-math#readme
// Definitions by: taoqf <https://github.com/taoqf>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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: Fri, 30 Jul 2021 20:31:31 GMT
  • Dependencies: none
  • Global values: Money

Credits

These definitions were written by taoqf.

2.5.4

7 months ago

2.5.3

8 months ago

2.5.5

6 months ago

2.5.2

3 years ago

2.5.1

3 years ago

2.5.0

6 years ago