diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js index 27686b1490f4e5..858dc938f01cd1 100644 --- a/lib/_stream_duplex.js +++ b/lib/_stream_duplex.js @@ -108,6 +108,16 @@ Object.defineProperty(Duplex.prototype, 'writableFinished', { } }); +Object.defineProperty(Duplex.prototype, 'writableCorked', { + // Making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get() { + return this._writableState ? this._writableState.corked : 0; + } +}); + Object.defineProperty(Duplex.prototype, 'writableEnded', { // Making it explicit this property is not enumerable // because otherwise some prototype manipulation in