Closed my1229 closed 3 years ago
If you want to override the family
option, then definitely a no. If you want to specify the family, then you can just set the family
option when calling lookup(...)
.
yes, override is not a good idea, but it seems that setting options.family also does not take effect when calling dns.lookup(...) interface,actually it is used to filter ip in package.
Is it possible that maybe cause a problem if calling ipv6 have wrong or timeout, the result will still return [] although options.family is ipv4 and dns.lookup ipv4 is also successed ?
It must be something wrong on your side, it works correctly here.
https://github.com/szmarczak/cacheable-lookup/blob/5960e1d98c61f9edd6873eb03050a12122f24af4/source/index.js#L285
could we set family by this._iface(has4 and has6), not set 0 always.