Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dad7821

Browse filesBrowse files
vsemozhetbyttargos
authored andcommitted
doc: fix sort in sections, lists, tables of dns.md
`dns.resolveAny()`, `dnsPromises.resolveAny()`, `dns.setServers()`, `dnsPromises.setServers()` were out of ABC order in some places. PR-URL: #21505 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent dbd810e commit dad7821
Copy full SHA for dad7821

File tree

Expand file treeCollapse file tree

1 file changed

+93
-93
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+93
-93
lines changed
Open diff view settings
Collapse file

‎doc/api/dns.md‎

Copy file name to clipboardExpand all lines: doc/api/dns.md
+93-93Lines changed: 93 additions & 93 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ resolver.resolve4('example.org', (err, addresses) => {
8282
The following methods from the `dns` module are available:
8383

8484
* [`resolver.getServers()`][`dns.getServers()`]
85-
* [`resolver.setServers()`][`dns.setServers()`]
8685
* [`resolver.resolve()`][`dns.resolve()`]
8786
* [`resolver.resolve4()`][`dns.resolve4()`]
8887
* [`resolver.resolve6()`][`dns.resolve6()`]
@@ -96,6 +95,7 @@ The following methods from the `dns` module are available:
9695
* [`resolver.resolveSrv()`][`dns.resolveSrv()`]
9796
* [`resolver.resolveTxt()`][`dns.resolveTxt()`]
9897
* [`resolver.reverse()`][`dns.reverse()`]
98+
* [`resolver.setServers()`][`dns.setServers()`]
9999

100100
### resolver.cancel()
101101
<!-- YAML
@@ -259,6 +259,7 @@ records. The type and structure of individual results varies based on `rrtype`:
259259
|-----------|--------------------------------|-------------|--------------------------|
260260
| `'A'` | IPv4 addresses (default) | {string} | [`dns.resolve4()`][] |
261261
| `'AAAA'` | IPv6 addresses | {string} | [`dns.resolve6()`][] |
262+
| `'ANY'` | any records | {Object} | [`dns.resolveAny()`][] |
262263
| `'CNAME'` | canonical name records | {string} | [`dns.resolveCname()`][] |
263264
| `'MX'` | mail exchange records | {Object} | [`dns.resolveMx()`][] |
264265
| `'NAPTR'` | name authority pointer records | {Object} | [`dns.resolveNaptr()`][] |
@@ -267,7 +268,6 @@ records. The type and structure of individual results varies based on `rrtype`:
267268
| `'SOA'` | start of authority records | {Object} | [`dns.resolveSoa()`][] |
268269
| `'SRV'` | service records | {Object} | [`dns.resolveSrv()`][] |
269270
| `'TXT'` | text records | {string[]} | [`dns.resolveTxt()`][] |
270-
| `'ANY'` | any records | {Object} | [`dns.resolveAny()`][] |
271271

272272
On error, `err` is an [`Error`][] object, where `err.code` is one of the
273273
[DNS error codes](#dns_error_codes).
@@ -319,6 +319,51 @@ Uses the DNS protocol to resolve a IPv6 addresses (`AAAA` records) for the
319319
`hostname`. The `addresses` argument passed to the `callback` function
320320
will contain an array of IPv6 addresses.
321321

322+
## dns.resolveAny(hostname, callback)
323+
324+
- `hostname` {string}
325+
- `callback` {Function}
326+
- `err` {Error}
327+
- `ret` {Object[]}
328+
329+
Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
330+
The `ret` argument passed to the `callback` function will be an array containing
331+
various types of records. Each object has a property `type` that indicates the
332+
type of the current record. And depending on the `type`, additional properties
333+
will be present on the object:
334+
335+
| Type | Properties |
336+
|------|------------|
337+
| `'A'` | `address`/`ttl` |
338+
| `'AAAA'` | `address`/`ttl` |
339+
| `'CNAME'` | `value` |
340+
| `'MX'` | Refer to [`dns.resolveMx()`][] |
341+
| `'NAPTR'` | Refer to [`dns.resolveNaptr()`][] |
342+
| `'NS'` | `value` |
343+
| `'PTR'` | `value` |
344+
| `'SOA'` | Refer to [`dns.resolveSoa()`][] |
345+
| `'SRV'` | Refer to [`dns.resolveSrv()`][] |
346+
| `'TXT'` | This type of record contains an array property called `entries` which refers to [`dns.resolveTxt()`][], e.g. `{ entries: ['...'], type: 'TXT' }` |
347+
348+
Here is an example of the `ret` object passed to the callback:
349+
350+
<!-- eslint-disable semi -->
351+
```js
352+
[ { type: 'A', address: '127.0.0.1', ttl: 299 },
353+
{ type: 'CNAME', value: 'example.com' },
354+
{ type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
355+
{ type: 'NS', value: 'ns1.example.com' },
356+
{ type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
357+
{ type: 'SOA',
358+
nsname: 'ns1.example.com',
359+
hostmaster: 'admin.example.com',
360+
serial: 156696742,
361+
refresh: 900,
362+
retry: 900,
363+
expire: 1800,
364+
minttl: 60 } ]
365+
```
366+
322367
## dns.resolveCname(hostname, callback)
323368
<!-- YAML
324369
added: v0.3.2
@@ -484,51 +529,6 @@ two-dimensional array of the text records available for `hostname` (e.g.
484529
one record. Depending on the use case, these could be either joined together or
485530
treated separately.
486531

487-
## dns.resolveAny(hostname, callback)
488-
489-
- `hostname` {string}
490-
- `callback` {Function}
491-
- `err` {Error}
492-
- `ret` {Object[]}
493-
494-
Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
495-
The `ret` argument passed to the `callback` function will be an array containing
496-
various types of records. Each object has a property `type` that indicates the
497-
type of the current record. And depending on the `type`, additional properties
498-
will be present on the object:
499-
500-
| Type | Properties |
501-
|------|------------|
502-
| `'A'` | `address`/`ttl` |
503-
| `'AAAA'` | `address`/`ttl` |
504-
| `'CNAME'` | `value` |
505-
| `'MX'` | Refer to [`dns.resolveMx()`][] |
506-
| `'NAPTR'` | Refer to [`dns.resolveNaptr()`][] |
507-
| `'NS'` | `value` |
508-
| `'PTR'` | `value` |
509-
| `'SOA'` | Refer to [`dns.resolveSoa()`][] |
510-
| `'SRV'` | Refer to [`dns.resolveSrv()`][] |
511-
| `'TXT'` | This type of record contains an array property called `entries` which refers to [`dns.resolveTxt()`][], e.g. `{ entries: ['...'], type: 'TXT' }` |
512-
513-
Here is an example of the `ret` object passed to the callback:
514-
515-
<!-- eslint-disable semi -->
516-
```js
517-
[ { type: 'A', address: '127.0.0.1', ttl: 299 },
518-
{ type: 'CNAME', value: 'example.com' },
519-
{ type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
520-
{ type: 'NS', value: 'ns1.example.com' },
521-
{ type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
522-
{ type: 'SOA',
523-
nsname: 'ns1.example.com',
524-
hostmaster: 'admin.example.com',
525-
serial: 156696742,
526-
refresh: 900,
527-
retry: 900,
528-
expire: 1800,
529-
minttl: 60 } ]
530-
```
531-
532532
## dns.reverse(ip, callback)
533533
<!-- YAML
534534
added: v0.1.16
@@ -607,7 +607,6 @@ resolver.resolve4('example.org').then((addresses) => {
607607
The following methods from the `dnsPromises` API are available:
608608

609609
* [`resolver.getServers()`][`dnsPromises.getServers()`]
610-
* [`resolver.setServers()`][`dnsPromises.setServers()`]
611610
* [`resolver.resolve()`][`dnsPromises.resolve()`]
612611
* [`resolver.resolve4()`][`dnsPromises.resolve4()`]
613612
* [`resolver.resolve6()`][`dnsPromises.resolve6()`]
@@ -621,6 +620,7 @@ The following methods from the `dnsPromises` API are available:
621620
* [`resolver.resolveSrv()`][`dnsPromises.resolveSrv()`]
622621
* [`resolver.resolveTxt()`][`dnsPromises.resolveTxt()`]
623622
* [`resolver.reverse()`][`dnsPromises.reverse()`]
623+
* [`resolver.setServers()`][`dnsPromises.setServers()`]
624624

625625
### dnsPromises.getServers()
626626
<!-- YAML
@@ -747,6 +747,7 @@ based on `rrtype`:
747747
|-----------|--------------------------------|-------------|--------------------------|
748748
| `'A'` | IPv4 addresses (default) | {string} | [`dnsPromises.resolve4()`][] |
749749
| `'AAAA'` | IPv6 addresses | {string} | [`dnsPromises.resolve6()`][] |
750+
| `'ANY'` | any records | {Object} | [`dnsPromises.resolveAny()`][] |
750751
| `'CNAME'` | canonical name records | {string} | [`dnsPromises.resolveCname()`][] |
751752
| `'MX'` | mail exchange records | {Object} | [`dnsPromises.resolveMx()`][] |
752753
| `'NAPTR'` | name authority pointer records | {Object} | [`dnsPromises.resolveNaptr()`][] |
@@ -755,7 +756,6 @@ based on `rrtype`:
755756
| `'SOA'` | start of authority records | {Object} | [`dnsPromises.resolveSoa()`][] |
756757
| `'SRV'` | service records | {Object} | [`dnsPromises.resolveSrv()`][] |
757758
| `'TXT'` | text records | {string[]} | [`dnsPromises.resolveTxt()`][] |
758-
| `'ANY'` | any records | {Object} | [`dnsPromises.resolveAny()`][] |
759759

760760
On error, the `Promise` is rejected with an [`Error`][] object, where `err.code`
761761
is one of the [DNS error codes](#dns_error_codes).
@@ -790,6 +790,50 @@ Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the
790790
`hostname`. On success, the `Promise` is resolved with an array of IPv6
791791
addresses.
792792

793+
### dnsPromises.resolveAny(hostname)
794+
<!-- YAML
795+
added: REPLACEME
796+
-->
797+
- `hostname` {string}
798+
799+
Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
800+
On success, the `Promise` is resolved with an array containing various types of
801+
records. Each object has a property `type` that indicates the type of the
802+
current record. And depending on the `type`, additional properties will be
803+
present on the object:
804+
805+
| Type | Properties |
806+
|------|------------|
807+
| `'A'` | `address`/`ttl` |
808+
| `'AAAA'` | `address`/`ttl` |
809+
| `'CNAME'` | `value` |
810+
| `'MX'` | Refer to [`dnsPromises.resolveMx()`][] |
811+
| `'NAPTR'` | Refer to [`dnsPromises.resolveNaptr()`][] |
812+
| `'NS'` | `value` |
813+
| `'PTR'` | `value` |
814+
| `'SOA'` | Refer to [`dnsPromises.resolveSoa()`][] |
815+
| `'SRV'` | Refer to [`dnsPromises.resolveSrv()`][] |
816+
| `'TXT'` | This type of record contains an array property called `entries` which refers to [`dnsPromises.resolveTxt()`][], e.g. `{ entries: ['...'], type: 'TXT' }` |
817+
818+
Here is an example of the result object:
819+
820+
<!-- eslint-disable semi -->
821+
```js
822+
[ { type: 'A', address: '127.0.0.1', ttl: 299 },
823+
{ type: 'CNAME', value: 'example.com' },
824+
{ type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
825+
{ type: 'NS', value: 'ns1.example.com' },
826+
{ type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
827+
{ type: 'SOA',
828+
nsname: 'ns1.example.com',
829+
hostmaster: 'admin.example.com',
830+
serial: 156696742,
831+
refresh: 900,
832+
retry: 900,
833+
expire: 1800,
834+
minttl: 60 } ]
835+
```
836+
793837
### dnsPromises.resolveCname(hostname)
794838
<!-- YAML
795839
added: REPLACEME
@@ -930,50 +974,6 @@ of the text records available for `hostname` (e.g.
930974
one record. Depending on the use case, these could be either joined together or
931975
treated separately.
932976

933-
### dnsPromises.resolveAny(hostname)
934-
<!-- YAML
935-
added: REPLACEME
936-
-->
937-
- `hostname` {string}
938-
939-
Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
940-
On success, the `Promise` is resolved with an array containing various types of
941-
records. Each object has a property `type` that indicates the type of the
942-
current record. And depending on the `type`, additional properties will be
943-
present on the object:
944-
945-
| Type | Properties |
946-
|------|------------|
947-
| `'A'` | `address`/`ttl` |
948-
| `'AAAA'` | `address`/`ttl` |
949-
| `'CNAME'` | `value` |
950-
| `'MX'` | Refer to [`dnsPromises.resolveMx()`][] |
951-
| `'NAPTR'` | Refer to [`dnsPromises.resolveNaptr()`][] |
952-
| `'NS'` | `value` |
953-
| `'PTR'` | `value` |
954-
| `'SOA'` | Refer to [`dnsPromises.resolveSoa()`][] |
955-
| `'SRV'` | Refer to [`dnsPromises.resolveSrv()`][] |
956-
| `'TXT'` | This type of record contains an array property called `entries` which refers to [`dnsPromises.resolveTxt()`][], e.g. `{ entries: ['...'], type: 'TXT' }` |
957-
958-
Here is an example of the result object:
959-
960-
<!-- eslint-disable semi -->
961-
```js
962-
[ { type: 'A', address: '127.0.0.1', ttl: 299 },
963-
{ type: 'CNAME', value: 'example.com' },
964-
{ type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
965-
{ type: 'NS', value: 'ns1.example.com' },
966-
{ type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
967-
{ type: 'SOA',
968-
nsname: 'ns1.example.com',
969-
hostmaster: 'admin.example.com',
970-
serial: 156696742,
971-
refresh: 900,
972-
retry: 900,
973-
expire: 1800,
974-
minttl: 60 } ]
975-
```
976-
977977
### dnsPromises.reverse(ip)
978978
<!-- YAML
979979
added: REPLACEME

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.