Skip to content

Commit

Permalink
dns: name generated functions
Browse files Browse the repository at this point in the history
PR-URL: #14518
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
  • Loading branch information
addaleax committed Aug 1, 2017
1 parent 0982810 commit 32b30d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ class Resolver {
}

function resolver(bindingName) {
return function query(name, /* options, */ callback) {
function query(name, /* options, */ callback) {
var options;
if (arguments.length > 2) {
options = callback;
Expand All @@ -275,7 +275,9 @@ function resolver(bindingName) {
var err = this._handle[bindingName](req, name);
if (err) throw errnoException(err, bindingName);
return req;
};
}
Object.defineProperty(query, 'name', { value: bindingName });
return query;
}

var resolveMap = Object.create(null);
Expand Down

0 comments on commit 32b30d5

Please sign in to comment.