Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
addaleax committed Dec 4, 2018
commit 94ee0f803d79f9bdb47e96e655ba4e5f4515efa3
2 changes: 1 addition & 1 deletion lib/zlib.js
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,6 @@ const bkeys = Object.keys(constants);
for (var bk = 0; bk < bkeys.length; bk++) {
var bkey = bkeys[bk];
Object.defineProperty(module.exports, bkey, {
enumerable: true, value: constants[bkey], writable: false
enumerable: false, value: constants[bkey], writable: false
});
}