Skip to content

Commit

Permalink
Added AUD and GBP to the Currency enumeration
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor-Losev committed May 12, 2023
1 parent 357c16a commit 30b3181
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .releases/4.27.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**New Features**

* Added an `Australian Dollar` to the `Currency` enumeration.
* Added a `British Pound` to the `Currency` enumeration.
22 changes: 22 additions & 0 deletions lang/Currency.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ module.exports = (() => {
return Enum.fromCode(Currency, code);
}

/**
* The Australian Dollar.
*
* @return {Currency}
* @constructor
*/
static get AUD() {
return aud;
}

/**
* The Canadian Dollar.
*
Expand All @@ -79,6 +89,16 @@ module.exports = (() => {
return eur;
}

/**
* The British Pound.
*
* @public
* @returns {Currency}
*/
static get GBP() {
return gbp;
}

/**
* The Hong Kong Dollar.
*
Expand Down Expand Up @@ -114,8 +134,10 @@ module.exports = (() => {
}
}

const aud = new Currency('AUD', 'Australian Dollar', 2, 'AUD$');
const cad = new Currency('CAD', 'Canadian Dollar', 2, 'CAD$');
const eur = new Currency('EUR', 'Euro', 2, 'EUR');
const gbp = new Currency('GBP', 'British Pound', 2, 'GBP');
const hkd = new Currency('HKD', 'Hong Kong Dollar', 2, 'HK$');
const jpy = new Currency('JPY', 'Japanese Yen', 2, 'JPY');
const usd = new Currency('USD', 'US Dollar', 2, 'US$');
Expand Down

0 comments on commit 30b3181

Please sign in to comment.