geography-apis-sdk
Version:
SDK for making requests to Geography APIs
34 lines (28 loc) • 628 B
JavaScript
/**
* Represents the demonyms of a country.
*/
class Demonyms {
/**
* Creates an instance of the Demonyms class.
* @param {object} data - The demonyms data.
*/
constructor(data) {
if(typeof data == 'undefined') return;
/**
* The demonym used for males.
* @type {string}
*/
this.male = data.male;
/**
* The demonym used for females.
* @type {string}
*/
this.female = data.female;
/**
* The demonym used for both genders.
* @type {string}
*/
this.demonym = data.demonym;
}
}
module.exports = Demonyms;