File tree Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change 2121
2222'use strict' ;
2323
24- const { Object } = primordials ;
25-
2624const { Buffer } = require ( 'buffer' ) ;
2725const pipeline = require ( 'internal/streams/pipeline' ) ;
2826const eos = require ( 'internal/streams/end-of-stream' ) ;
@@ -43,27 +41,7 @@ Stream.finished = eos;
4341// Backwards-compat with node 0.4.x
4442Stream . Stream = Stream ;
4543
46- // Internal utilities
47- try {
48- const types = require ( 'internal/util/types' ) ;
49- if ( types && typeof types . isUint8Array === 'function' ) {
50- Stream . _isUint8Array = types . isUint8Array ;
51- } else {
52- // This throws for Node < 4.2.0 because there's no util binding and
53- // returns undefined for Node < 7.4.0.
54- // Please do not convert process.binding() to internalBinding() here.
55- // This is for compatibility with older versions when loaded as
56- // readable-stream.
57- Stream . _isUint8Array = process . binding ( 'util' ) . isUint8Array ;
58- }
59- } catch ( e ) { // eslint-disable-line no-unused-vars
60- }
61-
62- if ( ! Stream . _isUint8Array ) {
63- Stream . _isUint8Array = function _isUint8Array ( obj ) {
64- return Object . prototype . toString . call ( obj ) === '[object Uint8Array]' ;
65- } ;
66- }
44+ Stream . _isUint8Array = require ( 'internal/util/types' ) . isUint8Array ;
6745
6846const version = process . version . substr ( 1 ) . split ( '.' ) ;
6947if ( version [ 0 ] === 0 && version [ 1 ] < 12 ) {
You can’t perform that action at this time.
0 commit comments