| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b14d7b3 commit c26258e
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,13 +10,13 @@ This category contains only one function: [`dns.lookup()`][]. **Developers | |||
| 10 | 10 | looking to perform name resolution in the same way that other applications on | |
| 11 | 11 | the same operating system behave should use [`dns.lookup()`][].** | |
| 12 | 12 | ||
| 13 | - For example, looking up `nodejs.org`. | ||
| 13 | + For example, looking up `iana.org`. | ||
| 14 | 14 | ||
| 15 | 15 | ```js | |
| 16 | 16 | const dns = require('dns'); | |
| 17 | 17 | ||
| 18 | - dns.lookup('nodejs.org', (err, address, family) => { | ||
| 19 | - console.log('address: %j family: IPv%s', address, family); | ||
| 18 | + dns.lookup('nodejs.org', (err, addresses, family) => { | ||
| 19 | + console.log('addresses:', addresses); | ||
| 20 | 20 | }); | |
| 21 | 21 | // address: "192.0.43.8" family: IPv4 | |
| 22 | 22 | ``` | |
@@ -29,13 +29,13 @@ functions do not use the same set of configuration files used by | |||
| 29 | 29 | developers who do not want to use the underlying operating system's facilities | |
| 30 | 30 | for name resolution, and instead want to _always_ perform DNS queries. | |
| 31 | 31 | ||
| 32 | - Below is an example that resolves `'nodejs.org'` then reverse resolves the IP | ||
| 32 | + Below is an example that resolves `'archive.org'` then reverse resolves the IP | ||
| 33 | 33 | addresses that are returned. | |
| 34 | 34 | ||
| 35 | 35 | ```js | |
| 36 | 36 | const dns = require('dns'); | |
| 37 | 37 | ||
| 38 | - dns.resolve4('nodejs.org', (err, addresses) => { | ||
| 38 | + dns.resolve4('archive.org', (err, addresses) => { | ||
| 39 | 39 | if (err) throw err; | |
| 40 | 40 | ||
| 41 | 41 | console.log(`addresses: ${JSON.stringify(addresses)}`); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments