Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use the new partial objectMode initialization
  • Loading branch information
seishun committed May 8, 2014
commit f5c95b8fd9206d0a9b75eea9f4cbf66f21ae6d7e
8 changes: 2 additions & 6 deletions lib/zlib.js
Original file line number Diff line number Diff line change
Expand Up @@ -629,9 +629,7 @@ function CRC32() {
if (!(this instanceof CRC32))
return new CRC32();
this._binding = new binding.CRC32();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for consistency with the rest of our internal code, let's make that _handle

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this? Or do you propose to change that as well?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer for that to be _handle as well, but I'm just reviewing this patch -- I would accept a patch in the future that makes our usage consistent across all modules

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really like the idea of being inconsistent with the rest of zlib.js. How about we change everything to _handle in crypto.js and zlib.js first? I'd gladly contribute a patch.

Transform.call(this);
this._writableState.objectMode = false;
this._readableState.objectMode = true;
Transform.call(this, { readableObjectMode : true });
}

util.inherits(CRC32, Transform);
Expand All @@ -652,9 +650,7 @@ function Adler32() {
if (!(this instanceof Adler32))
return new Adler32();
this._binding = new binding.Adler32();
Transform.call(this);
this._writableState.objectMode = false;
this._readableState.objectMode = true;
Transform.call(this, { readableObjectMode : true });
}

util.inherits(Adler32, Transform);
Expand Down