Class Currency

Monetary unit used to express a value.

The minor unit of a currency, as described in the ISO 4217 standard, is the maximal size of the fractional part that can be used to describe the value when in a decimal form.

For instance, US dollar has a minor unit of 2. This means that value in US dollar must be express with two digits after the decimal separator like in the following: 10.34 This can be done with the following instantiation:

Example

const dollar = new Currency("dollar", 2);

Hierarchy

  • Currency

Constructors

Properties

Methods

Constructors

Properties

minorUnit: number = 0

minor unit of the currency.

name: string = ''

name of the currency.

Methods

Generated using TypeDoc