Skip to content

Commit 22c434c

Browse files
authored
zlib deprecation prevention (#119)
Access Z_SYNC_FLUSH is still possible but deprecated. Prevented this deprecation by accessing Z_SYNC_FLUSH from constants namespace.
1 parent 23f0eba commit 22c434c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ app.use(compress({
1818
},
1919
threshold: 2048,
2020
gzip: {
21-
flush: require('zlib').Z_SYNC_FLUSH
21+
flush: require('zlib').constants.Z_SYNC_FLUSH
2222
},
2323
deflate: {
24-
flush: require('zlib').Z_SYNC_FLUSH,
24+
flush: require('zlib').constants.Z_SYNC_FLUSH,
2525
},
2626
br: false // disable brotli
2727
}))

0 commit comments

Comments
 (0)