mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
zlib: use for...of
PR-URL: https://github.com/nodejs/node/pull/31051 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 parent
6bec620efc
commit
a2fa0318be
1 file changed
+2
-6
+2
-6
@@ -92,9 +92,7 @@ const codes = {
|
||||
Z_VERSION_ERROR: constants.Z_VERSION_ERROR
|
||||
};
|
||||
|
||||
const ckeys = ObjectKeys(codes);
|
||||
for (let ck = 0; ck < ckeys.length; ck++) {
|
||||
const ckey = ckeys[ck];
|
||||
for (const ckey of ObjectKeys(codes)) {
|
||||
codes[codes[ckey]] = ckey;
|
||||
}
|
||||
|
||||
@@ -912,9 +910,7 @@ ObjectDefineProperties(module.exports, {
|
||||
|
||||
// These should be considered deprecated
|
||||
// expose all the zlib constants
|
||||
const bkeys = ObjectKeys(constants);
|
||||
for (let bk = 0; bk < bkeys.length; bk++) {
|
||||
const bkey = bkeys[bk];
|
||||
for (const bkey of ObjectKeys(constants)) {
|
||||
if (bkey.startsWith('BROTLI')) continue;
|
||||
ObjectDefineProperty(module.exports, bkey, {
|
||||
enumerable: false, value: constants[bkey], writable: false
|
||||
|
||||
Reference in new issue
Block a user