mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00: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:
@@ -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