Skip to content

dns.lookup return a string with no options #11334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/api/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ For example, looking up `iana.org`.
```js
const dns = require('dns');

dns.lookup('iana.org', (err, addresses, family) => {
console.log('addresses:', addresses);
dns.lookup('iana.org', (err, address, family) => {
console.log('address:', address);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would likely be worthwhile showing two examples, this one and one with all = true so that address becomes an Array.

Copy link
Contributor Author

@dcharbonnier dcharbonnier Feb 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR fix a mistake, not to enhance the documentation, I can do it but I'm scared that we end up on a very long debate on when to provide examples or not instead of a 5 seconds fix....

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

});
```

Expand Down