import * as plugins from './smartwhois.plugins.js'; export class SmartWhois { public async getWhoisForDomain(domainArg: string) { const whoisInfo = await plugins.whoiser.domain(domainArg); const whoisServers = Object.keys(whoisInfo); const selectedWhoisInfo: any = whoisInfo[whoisServers[0]]; const registrar = selectedWhoisInfo.Registrar; const registrarUrl = selectedWhoisInfo['Registrar URL']; const createdDate = selectedWhoisInfo['Created Date']; const updatedDate = selectedWhoisInfo['Updated Date']; const expiryDate = selectedWhoisInfo['Expiry Date']; return { originalWhoisInfo: whoisInfo, whoisServers, registrar, registrarUrl, createdDate, updatedDate, expiryDate, }; } public async getWhoisForIp(ipArg: string) {} }