You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
|`'ANY'`| any records | {Object} |[`dns.resolveAny()`][]|
262
263
|`'CNAME'`| canonical name records | {string} |[`dns.resolveCname()`][]|
263
264
|`'MX'`| mail exchange records | {Object} |[`dns.resolveMx()`][]|
264
265
|`'NAPTR'`| name authority pointer records | {Object} |[`dns.resolveNaptr()`][]|
@@ -267,7 +268,6 @@ records. The type and structure of individual results varies based on `rrtype`:
267
268
|`'SOA'`| start of authority records | {Object} |[`dns.resolveSoa()`][]|
268
269
|`'SRV'`| service records | {Object} |[`dns.resolveSrv()`][]|
269
270
|`'TXT'`| text records | {string[]} |[`dns.resolveTxt()`][]|
270
-
|`'ANY'`| any records | {Object} |[`dns.resolveAny()`][]|
271
271
272
272
On error, `err` is an [`Error`][] object, where `err.code` is one of the
273
273
[DNS error codes](#dns_error_codes).
@@ -319,6 +319,51 @@ Uses the DNS protocol to resolve a IPv6 addresses (`AAAA` records) for the
319
319
`hostname`. The `addresses` argument passed to the `callback` function
320
320
will contain an array of IPv6 addresses.
321
321
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:
@@ -484,51 +529,6 @@ two-dimensional array of the text records available for `hostname` (e.g.
484
529
one record. Depending on the use case, these could be either joined together or
485
530
treated separately.
486
531
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:
|`'ANY'`| any records | {Object} |[`dnsPromises.resolveAny()`][]|
750
751
|`'CNAME'`| canonical name records | {string} |[`dnsPromises.resolveCname()`][]|
751
752
|`'MX'`| mail exchange records | {Object} |[`dnsPromises.resolveMx()`][]|
752
753
|`'NAPTR'`| name authority pointer records | {Object} |[`dnsPromises.resolveNaptr()`][]|
@@ -755,7 +756,6 @@ based on `rrtype`:
755
756
|`'SOA'`| start of authority records | {Object} |[`dnsPromises.resolveSoa()`][]|
756
757
|`'SRV'`| service records | {Object} |[`dnsPromises.resolveSrv()`][]|
757
758
|`'TXT'`| text records | {string[]} |[`dnsPromises.resolveTxt()`][]|
758
-
|`'ANY'`| any records | {Object} |[`dnsPromises.resolveAny()`][]|
759
759
760
760
On error, the `Promise` is rejected with an [`Error`][] object, where `err.code`
761
761
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
790
790
`hostname`. On success, the `Promise` is resolved with an array of IPv6
791
791
addresses.
792
792
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' }`|
@@ -930,50 +974,6 @@ of the text records available for `hostname` (e.g.
930
974
one record. Depending on the use case, these could be either joined together or
931
975
treated separately.
932
976
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' }`|
0 commit comments