Browse Source

util: remove redundant declaration

This module is already required in the top scope (Line 3).

PR-URL: https://github.com/nodejs/node/pull/14199
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
v6
Vse Mozhet Byt 8 years ago
parent
commit
2288e3f21c
  1. 4
      lib/internal/util.js

4
lib/internal/util.js

@ -202,10 +202,8 @@ const kCustomPromisifiedSymbol = Symbol('util.promisify.custom');
const kCustomPromisifyArgsSymbol = Symbol('customPromisifyArgs'); const kCustomPromisifyArgsSymbol = Symbol('customPromisifyArgs');
function promisify(orig) { function promisify(orig) {
if (typeof orig !== 'function') { if (typeof orig !== 'function')
const errors = require('internal/errors');
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function'); throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function');
}
if (orig[kCustomPromisifiedSymbol]) { if (orig[kCustomPromisifiedSymbol]) {
const fn = orig[kCustomPromisifiedSymbol]; const fn = orig[kCustomPromisifiedSymbol];

Loading…
Cancel
Save