lib: remove usage of require('util')
Remove the usage of `require('util').inspect`. PR-URL: https://github.com/nodejs/node/pull/26779 Refs: https://github.com/nodejs/node/issues/26546 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
This commit is contained in:
parent
cf1b9d395d
commit
e5383adb25
@ -327,7 +327,7 @@ class TextEncoder {
|
||||
});
|
||||
obj.encoding = this.encoding;
|
||||
// Lazy to avoid circular dependency
|
||||
return require('util').inspect(obj, opts);
|
||||
return require('internal/util/inspect').inspect(obj, opts);
|
||||
}
|
||||
}
|
||||
|
||||
@ -528,7 +528,7 @@ function makeTextDecoderJS() {
|
||||
obj[kHandle] = this[kHandle];
|
||||
}
|
||||
// Lazy to avoid circular dependency
|
||||
return require('util').inspect(obj, opts);
|
||||
return require('internal/util/inspect').inspect(obj, opts);
|
||||
}
|
||||
}));
|
||||
Object.defineProperties(TextDecoder.prototype, {
|
||||
|
Loading…
x
Reference in New Issue
Block a user