# Class: CurrencyConverter

## montage/core/converter/currency-converter~ CurrencyConverter

Formats a value as a currency.

## Constructor

#### new CurrencyConverter()

Source:
  - core/converter/currency-converter.js, line 7

### Extends

- NumberConverter

### Members

#### allowFloat :Property

##### Type:

- Property

Inherited From:
  - NumberConverter#allowFloat
Default Value:
  - {boolean} true
Source:
  - core/converter/number-converter.js, line 333

#### allowNegative :Property

##### Type:

- Property

Inherited From:
  - NumberConverter#allowNegative
Default Value:
  - {boolean} true
Source:
  - core/converter/number-converter.js, line 341

#### allowPartialConversion :Property

Allow partial conversion

##### Type:

- Property

Inherited From:
  - NumberConverter#allowPartialConversion
Default Value:
  - {boolean} false
Source:
  - core/converter/number-converter.js, line 280

#### decimals :Property

##### Type:

- Property

Inherited From:
  - NumberConverter#decimals
Default Value:
  - {number} 2
Source:
  - core/converter/number-converter.js, line 305

#### forceDecimals :Property

##### Type:

- Property

Inherited From:
  - NumberConverter#forceDecimals
Default Value:
  - {boolean} false
Source:
  - core/converter/number-converter.js, line 313

#### round :Property

##### Type:

- Property

Inherited From:
  - NumberConverter#round
Default Value:
  - {number} null
Source:
  - core/converter/number-converter.js, line 321

#### shorten :Property

##### Type:

- Property

Inherited From:
  - NumberConverter#shorten
Default Value:
  - {string} null
Source:
  - core/converter/number-converter.js, line 297

#### validator :function

##### Type:

- function

Inherited From:
  - NumberConverter#validator
Default Value:
  - {attribute} NumberValidator Uses this object.
Source:
  - core/converter/number-converter.js, line 288

### Methods

#### convert(value) → {string}

##### Parameters:

Name | Type | Description
--- | --- | ---
`value` | number | The value to convert.

Inherited From:
  - NumberConverter#convert
Source:
  - core/converter/number-converter.js, line 374

##### Returns:

Type
  string

#### revert(stringValue) → {number}

##### Parameters:

Name | Type | Description
--- | --- | ---
`stringValue` | string | The string representation of a number.

Inherited From:
  - NumberConverter#revert
Source:
  - core/converter/number-converter.js, line 405
See:
  - NumberConverter#validator
  - NumberConverter#allowFloat
  - NumberConverter#allowNegative

##### Throws:

if the return value of NumberConverter#validator#validate is not a number

Type
  Error

##### Returns:

The numeric value validated with to NumberConverter#validator.

Type
  number