Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2017-08-10 12:19:13 +0300
committerMyles Borins <mylesborins@google.com>2017-09-12 04:17:11 +0300
commit13577d4ada20e33f6e55a503a3c41a8aa225c368 (patch)
treef27e45a90a5072e9b1c3802a2da6c1b42b6b02bc /doc/api/dns.md
parent3d9ad827296905b6cf54519f0b208617afd2ee85 (diff)
dns: add `verbatim` option to dns.lookup()
When true, results from the DNS resolver are passed on as-is, without the reshuffling that Node.js otherwise does that puts IPv4 addresses before IPv6 addresses. PR-URL: https://github.com/nodejs/node/pull/14731 Ref: https://github.com/nodejs/node/issues/6307 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/dns.md')
-rw-r--r--doc/api/dns.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/api/dns.md b/doc/api/dns.md
index 0d191af15e8..46927e5f528 100644
--- a/doc/api/dns.md
+++ b/doc/api/dns.md
@@ -140,6 +140,12 @@ changes:
flags may be passed by bitwise `OR`ing their values.
- `all` {boolean} When `true`, the callback returns all resolved addresses in
an array. Otherwise, returns a single address. Defaults to `false`.
+ - `verbatim` {boolean} When `true`, the callback receives IPv4 and IPv6
+ addresses in the order the DNS resolver returned them. When `false`,
+ IPv4 addresses are placed before IPv6 addresses.
+ Default: currently `false` (addresses are reordered) but this is expected
+ to change in the not too distant future.
+ New code should use `{ verbatim: true }`.
- `callback` {Function}
- `err` {Error}
- `address` {string} A string representation of an IPv4 or IPv6 address.