UNPKG

geography-apis-sdk

Version:

SDK for making requests to Geography APIs

27 lines (23 loc) 536 B
/** * Represents the International Direct Dialing (IDD) of a country. */ class Idd { /** * Creates an instance of the Idd class. * @param {object} data - The IDD data. */ constructor(data) { if(typeof data == 'undefined') return; /** * The IDD prefix of the country. * @type {string} */ this.root = data.root; /** * The IDD suffixes of the country. * @type {Array.<string>} */ this.suffixes = data.suffixes || []; } } module.exports = Idd;