UNPKG

geography-apis-sdk

Version:

SDK for making requests to Geography APIs

34 lines (29 loc) 669 B
const Native = require('./Native'); /** * Represents the name of a country. */ class Name { /** * Creates an instance of the Name class. * @param {object} data - The name data. */ constructor(data) { if(typeof data == 'undefined') return; /** * The common name of the country. * @type {string} */ this.common = data.common; /** * The official name of the country. * @type {string} */ this.official = data.official; /** * The native name(s) of the country. * @type {Native} */ this.native = new Native(data.native); } } module.exports = Name;