dns: remove makeAsync() function check

makeAsync() is an internal method in the dns module. All of the
functions that call makeAsync() have already validated that the
callback is a function. This commit removes a redundant typeof
function check.

PR-URL: https://github.com/nodejs/node/pull/8170
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
This commit is contained in:
cjihrig 2016-08-18 17:15:37 -04:00 committed by James M Snell
parent 3a43568020
commit 013d76cb73

View File

@ -56,9 +56,6 @@ function errnoException(err, syscall, hostname) {
// callback.immediately = true;
// }
function makeAsync(callback) {
if (typeof callback !== 'function') {
return callback;
}
return function asyncCallback() {
if (asyncCallback.immediately) {
// The API already returned, we can invoke the callback immediately.