From 94ee0f803d79f9bdb47e96e655ba4e5f4515efa3 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. --- lib/zlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/zlib.js b/lib/zlib.js index 559f6c2d5f3056..a918411160c76d 100644 --- a/lib/zlib.js +++ b/lib/zlib.js @@ -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 }); }