Skip to content

Commit 4eee55d

Browse files
committed
zlib: make “bare” constants un-enumerable
We prefer for users to use `zlib.constants.XXX` instead of `zlib.XXX`. Having both enumerable means that inspecting the `zlib` module shows both variants, making the output significantly longer and redundant. PR-URL: #24824 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 26b58ea commit 4eee55d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/zlib.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,6 @@ const bkeys = Object.keys(constants);
786786
for (var bk = 0; bk < bkeys.length; bk++) {
787787
var bkey = bkeys[bk];
788788
Object.defineProperty(module.exports, bkey, {
789-
enumerable: true, value: constants[bkey], writable: false
789+
enumerable: false, value: constants[bkey], writable: false
790790
});
791791
}

0 commit comments

Comments
 (0)