Skip to content

Commit

Permalink
Partially revert "stream: reduce internal usage of public require of …
Browse files Browse the repository at this point in the history
…util"

This partially reverts commit c97851d.

Streams code should ideally require on public APIs as much as possible,
because it is exported as readable-stream.

Refs: nodejs#26698
Refs: nodejs/readable-stream#416
  • Loading branch information
addaleax committed Sep 6, 2019
1 parent 63b056d commit 2cde79b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/internal/streams/buffer_list.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const { Buffer } = require('buffer');
const { inspect } = require('internal/util/inspect');
const { inspect } = require('util');

module.exports = class BufferList {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion lib/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Stream.Stream = Stream;

// Internal utilities
try {
const types = require('internal/util/types');
const types = require('util').types;
if (types && typeof types.isUint8Array === 'function') {
Stream._isUint8Array = types.isUint8Array;
} else {
Expand Down

0 comments on commit 2cde79b

Please sign in to comment.