zlib.bytesRead → zlib.bytesWritten DEP0108
This codemod replaces zlib.bytesRead with zlib.bytesWritten for consistent stream property naming. It's useful to migrate code that uses the deprecated property which has been removed.
It replaces zlib.bytesRead with zlib.bytesWritten in all zlib transform streams and it handles both CommonJS and ESM imports.
See DEP0108.
Example
Case 1
Before:
js
After:
js
Case 2
Before:
js
After:
js
Case 3
Before:
js
After:
js
Case 4
Before:
js
After:
js
Case 5
Before:
js
After:
js
Case 6
Before:
js
After:
js