The following code makes use of a simple promise and works perfectly.
ipToDomain = (ip) => { return new Promise((resolve, reject) => { dns.rever