We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9f0351 commit 0a958f4Copy full SHA for 0a958f4
1 file changed
lib/zlib.js
@@ -91,9 +91,7 @@ const codes = {
91
Z_VERSION_ERROR: constants.Z_VERSION_ERROR
92
};
93
94
-const ckeys = ObjectKeys(codes);
95
-for (let ck = 0; ck < ckeys.length; ck++) {
96
- const ckey = ckeys[ck];
+for (const ckey of ObjectKeys(codes)) {
97
codes[codes[ckey]] = ckey;
98
}
99
@@ -911,9 +909,7 @@ ObjectDefineProperties(module.exports, {
911
909
912
910
// These should be considered deprecated
913
// expose all the zlib constants
914
-const bkeys = ObjectKeys(constants);
915
-for (let bk = 0; bk < bkeys.length; bk++) {
916
- const bkey = bkeys[bk];
+for (const bkey of ObjectKeys(constants)) {
917
if (bkey.startsWith('BROTLI')) continue;
918
ObjectDefineProperty(module.exports, bkey, {
919
enumerable: false, value: constants[bkey], writable: false
0 commit comments