We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36380eb commit a275155Copy full SHA for a275155
2 files changed
lib/internal/webstreams/compression.js
@@ -2,6 +2,7 @@
2
3
const {
4
ObjectDefineProperties,
5
+ SymbolToStringTag,
6
} = primordials;
7
8
@@ -137,11 +138,21 @@ class DecompressionStream {
137
138
ObjectDefineProperties(CompressionStream.prototype, {
139
readable: kEnumerableProperty,
140
writable: kEnumerableProperty,
141
+ [SymbolToStringTag]: {
142
+ __proto__: null,
143
+ configurable: true,
144
+ value: 'CompressionStream',
145
+ },
146
});
147
148
ObjectDefineProperties(DecompressionStream.prototype, {
149
150
151
152
153
154
+ value: 'DecompressionStream',
155
156
157
158
module.exports = {
test/parallel/test-whatwg-webstreams-compression.js
@@ -15,6 +15,9 @@ async function test(format) {
15
const gzip = new CompressionStream(format);
16
const gunzip = new DecompressionStream(format);
17
18
+ assert.strictEqual(gzip[Symbol.toStringTag], 'CompressionStream');
19
+ assert.strictEqual(gunzip[Symbol.toStringTag], 'DecompressionStream');
20
+
21
gzip.readable.pipeTo(gunzip.writable).then(common.mustCall());
22
23
const reader = gunzip.readable.getReader();
0 commit comments