From 4eee55d354549d08c8224f151159fbcd7d6b2b6e Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 4 Dec 2018 10:00:09 +0100 Subject: zlib: make “bare” constants un-enumerable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Colin Ihrig Reviewed-By: Jeremiah Senkpiel Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater --- lib/zlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/zlib.js') 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 }); } -- cgit v1.2.3