UNPKG

geography-apis-sdk

Version:

SDK for making requests to Geography APIs

40 lines (33 loc) 734 B
/** * Represents a language. */ class Language { /** * Creates an instance of the Language class. * @param {object} data - The language data. */ constructor(data) { if(typeof data == 'undefined') return; /** * The ISO 639-1 language code. * @type {string} */ this.iso639_1 = data.iso639_1; /** * The ISO 639-2 language code. * @type {string} */ this.iso639_2 = data.iso639_2; /** * The name of the language. * @type {string} */ this.name = data.name; /** * The native name of the language. * @type {string} */ this.nativeName = data.nativeName; } } module.exports = Language;