From 4eee55d354549d08c8224f151159fbcd7d6b2b6e Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 4 Dec 2018 10:00:09 +0100 Subject: [PATCH] =?UTF-8?q?zlib:=20make=20=E2=80=9Cbare=E2=80=9D=20constan?= =?UTF-8?q?ts=20un-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(-) diff --git a/lib/zlib.js b/lib/zlib.js index fc1eeaf2b099fc..92286536ce6e43 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 }); }