summaryrefslogtreecommitdiff
path: root/lib/internal/streams
diff options
context:
space:
mode:
authorBeni von Cheni <benjaminlchen@gmail.com>2019-03-16 01:19:44 -0400
committerRuben Bridgewater <ruben@bridgewater.de>2019-03-22 00:48:32 +0100
commitc97851dcd8c5e96a3601df52edd456922399a80b (patch)
tree7ee04033c643462437d3a678b24191941cf3302e /lib/internal/streams
parentd117e41e50667d7a36259bfc69416216bdf74eae (diff)
downloadandroid-node-v8-c97851dcd8c5e96a3601df52edd456922399a80b.tar.gz
android-node-v8-c97851dcd8c5e96a3601df52edd456922399a80b.tar.bz2
android-node-v8-c97851dcd8c5e96a3601df52edd456922399a80b.zip
stream: reduce internal usage of public require of util
PR-URL: https://github.com/nodejs/node/pull/26698 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/internal/streams')
-rw-r--r--lib/internal/streams/buffer_list.js2
-rw-r--r--lib/internal/streams/lazy_transform.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/internal/streams/buffer_list.js b/lib/internal/streams/buffer_list.js
index aa254309a0..e0ba6e885c 100644
--- a/lib/internal/streams/buffer_list.js
+++ b/lib/internal/streams/buffer_list.js
@@ -1,7 +1,7 @@
'use strict';
const { Buffer } = require('buffer');
-const { inspect } = require('util');
+const { inspect } = require('internal/util/inspect');
function copyBuffer(src, target, offset) {
Buffer.prototype.copy.call(src, target, offset);
diff --git a/lib/internal/streams/lazy_transform.js b/lib/internal/streams/lazy_transform.js
index c4d8c64b3d..7fc7f899c6 100644
--- a/lib/internal/streams/lazy_transform.js
+++ b/lib/internal/streams/lazy_transform.js
@@ -4,7 +4,6 @@
'use strict';
const stream = require('stream');
-const util = require('util');
const {
getDefaultEncoding
@@ -17,7 +16,8 @@ function LazyTransform(options) {
this.writable = true;
this.readable = true;
}
-util.inherits(LazyTransform, stream.Transform);
+Object.setPrototypeOf(LazyTransform.prototype, stream.Transform.prototype);
+Object.setPrototypeOf(LazyTransform, stream.Transform);
function makeGetter(name) {
return function() {