diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-12-04 10:00:09 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-12-07 18:20:31 +0100 |
commit | 4eee55d354549d08c8224f151159fbcd7d6b2b6e (patch) | |
tree | 9cbe6edcd16c45d8a3d72d52571e74ad2411ee65 /lib/zlib.js | |
parent | 26b58eabc6348ff12047cc2f7575f5b10cd3f317 (diff) | |
download | android-node-v8-4eee55d354549d08c8224f151159fbcd7d6b2b6e.tar.gz android-node-v8-4eee55d354549d08c8224f151159fbcd7d6b2b6e.tar.bz2 android-node-v8-4eee55d354549d08c8224f151159fbcd7d6b2b6e.zip |
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: https://github.com/nodejs/node/pull/24824
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'lib/zlib.js')
-rw-r--r-- | lib/zlib.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/zlib.js b/lib/zlib.js index fc1eeaf2b0..92286536ce 100644 --- a/lib/zlib.js +++ b/lib/zlib.js @@ -786,6 +786,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 }); } |