| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,9 +10,8 @@ addresses of host names. | |||
| 10 | 10 | Although named for the [Domain Name System (DNS)][], it does not always use the | |
| 11 | 11 | DNS protocol for lookups. [`dns.lookup()`][] uses the operating system | |
| 12 | 12 | facilities to perform name resolution. It may not need to perform any network | |
| 13 | - communication. Developers looking to perform name resolution in the same way | ||
| 14 | - that other applications on the same operating system behave should use | ||
| 15 | - [`dns.lookup()`][]. | ||
| 13 | + communication. To perform name resolution the way other applications on the same | ||
| 14 | + system do, use [`dns.lookup()`][]. | ||
| 16 | 15 | ||
| 17 | 16 | ```js | |
| 18 | 17 | const dns = require('dns'); | |
@@ -26,9 +25,8 @@ dns.lookup('example.org', (err, address, family) => { | |||
| 26 | 25 | All other functions in the `dns` module connect to an actual DNS server to | |
| 27 | 26 | perform name resolution. They will always use the network to perform DNS | |
| 28 | 27 | queries. These functions do not use the same set of configuration files used by | |
| 29 | - [`dns.lookup()`][] (e.g. `/etc/hosts`). These functions should be used by | ||
| 30 | - developers who do not want to use the underlying operating system's | ||
| 31 | - facilities for name resolution, and instead want to always perform DNS queries. | ||
| 28 | + [`dns.lookup()`][] (e.g. `/etc/hosts`). Use these functions to always perform | ||
| 29 | + DNS queries, bypassing other name-resolution facilities. | ||
| 32 | 30 | ||
| 33 | 31 | ```js | |
| 34 | 32 | const dns = require('dns'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments