geography-apis-sdk
Version:
SDK for making requests to Geography APIs
34 lines (28 loc) • 573 B
JavaScript
/**
* Represents a currency.
*/
class Currency {
/**
* Creates an instance of the Currency class.
* @param {object} data - The currency data.
*/
constructor(data) {
if(typeof data == 'undefined') return;
/**
* The currency code.
* @type {string}
*/
this.code = data.code;
/**
* The currency name.
* @type {string}
*/
this.name = data.name;
/**
* The currency symbol.
* @type {string}
*/
this.symbol = data.symbol;
}
}
module.exports = Currency;