diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 18af26d1e9f719..6482bfe328dd35 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -1215,6 +1215,22 @@ ObjectDefineProperties(Readable.prototype, { } }, + pipesCount: { + enumerable: false, + get() { + return this._readableState ? this._readableState.pipesCount : 0; + } + }, + + paused: { + enumerable: false, + get() { + return this._readableState ? this._readableState.paused : false; + } + } +}); + +ObjectDefineProperties(ReadableState.prototype, { // Legacy getter for `pipesCount` pipesCount: { get() {