not getting full parameters of callbacks
hbakhtiyor opened this issue · comments
Abd ar-Rahman Hamidi commented
e.g.
const dns = require('dns');
const pify = require('pify');
const dnsLookup = pify(dns.lookup);
(async () => {
const result = await dnsLookup('example.com');
console.log(result); // => 93.184.216.34
})()
only getting ip address, from the doc, the callback is passing family
param too
need return object, e.g.
const {address, family} = await dnsLookup('example.com');