mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
feat(dns): reduce one isIP function call by simplifying condition
This commit is contained in:
parent
4645738699
commit
f325f147d7
1 changed files with 1 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ export default class DnsResolver {
|
||||||
this.logger.debug('DNS Lookup: ' + host)
|
this.logger.debug('DNS Lookup: ' + host)
|
||||||
|
|
||||||
// Check if host is IPv4 or IPv6
|
// Check if host is IPv4 or IPv6
|
||||||
if (isIP(host) === 4 || isIP(host) === 6) {
|
if (isIP(host)) {
|
||||||
this.logger.debug('Raw IP Address: ' + host)
|
this.logger.debug('Raw IP Address: ' + host)
|
||||||
return { address: host }
|
return { address: host }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue