Skip to content

Commit

Permalink
doc: revise text in dns module documentation introduction
Browse files Browse the repository at this point in the history
PR-URL: #33986
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
Trott authored and codebytere committed Jul 10, 2020
1 parent d6d1230 commit 5dc0443
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions doc/api/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ addresses of host names.
Although named for the [Domain Name System (DNS)][], it does not always use the
DNS protocol for lookups. [`dns.lookup()`][] uses the operating system
facilities to perform name resolution. It may not need to perform any network
communication. Developers looking to perform name resolution in the same way
that other applications on the same operating system behave should use
[`dns.lookup()`][].
communication. To perform name resolution the way other applications on the same
system do, use [`dns.lookup()`][].

```js
const dns = require('dns');
Expand All @@ -26,9 +25,8 @@ dns.lookup('example.org', (err, address, family) => {
All other functions in the `dns` module connect to an actual DNS server to
perform name resolution. They will always use the network to perform DNS
queries. These functions do not use the same set of configuration files used by
[`dns.lookup()`][] (e.g. `/etc/hosts`). These functions should be used by
developers who do not want to use the underlying operating system's
facilities for name resolution, and instead want to always perform DNS queries.
[`dns.lookup()`][] (e.g. `/etc/hosts`). Use these functions to always perform
DNS queries, bypassing other name-resolution facilities.

```js
const dns = require('dns');
Expand Down

0 comments on commit 5dc0443

Please sign in to comment.