UNPKG

geography-apis-sdk

Version:

SDK for making requests to Geography APIs

28 lines (24 loc) 549 B
const LatLng = require('./LatLng'); /** * Represents a capital city. */ class Capital { /** * Creates an instance of the Capital class. * @param {object} data - The capital data. */ constructor(data) { if(typeof data == 'undefined') return; /** * The name of the capital city. * @type {string} */ this.name = data.name; /** * The coordinates of the capital city. * @type {LatLng} */ this.latLng = new LatLng(data.latLng); } } module.exports = Capital;