summaryrefslogtreecommitdiff
path: root/lib/_stream_transform.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/_stream_transform.js')
-rw-r--r--lib/_stream_transform.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js
index 8745c71341..cec617dfb6 100644
--- a/lib/_stream_transform.js
+++ b/lib/_stream_transform.js
@@ -76,10 +76,10 @@ Object.setPrototypeOf(Transform, Duplex);
function afterTransform(er, data) {
- var ts = this._transformState;
+ const ts = this._transformState;
ts.transforming = false;
- var cb = ts.writecb;
+ const cb = ts.writecb;
if (cb === null) {
return this.emit('error', new ERR_MULTIPLE_CALLBACK());
@@ -93,7 +93,7 @@ function afterTransform(er, data) {
cb(er);
- var rs = this._readableState;
+ const rs = this._readableState;
rs.reading = false;
if (rs.needReadable || rs.length < rs.highWaterMark) {
this._read(rs.highWaterMark);
@@ -163,7 +163,7 @@ Transform.prototype._transform = function(chunk, encoding, cb) {
};
Transform.prototype._write = function(chunk, encoding, cb) {
- var ts = this._transformState;
+ const ts = this._transformState;
ts.writecb = cb;
ts.writechunk = chunk;
ts.writeencoding = encoding;
@@ -180,7 +180,7 @@ Transform.prototype._write = function(chunk, encoding, cb) {
// _transform does all the work.
// That we got here means that the readable side wants more data.
Transform.prototype._read = function(n) {
- var ts = this._transformState;
+ const ts = this._transformState;
if (ts.writechunk !== null && !ts.transforming) {
ts.transforming = true;