mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
stream: add writableCorked to Duplex
PR-URL: https://github.com/nodejs/node/pull/29053 Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
1 file changed
+10
@@ -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
|
||||
|
||||
Reference in new issue
Block a user