Skip to content

Commit 4dc6ae2

Browse files
committed
lib: remove unused variables
PR-URL: #1290 Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 245ba1d commit 4dc6ae2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/_stream_writable.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Writable.prototype.pipe = function() {
154154
};
155155

156156

157-
function writeAfterEnd(stream, state, cb) {
157+
function writeAfterEnd(stream, cb) {
158158
var er = new Error('write after end');
159159
// TODO: defer error events consistently everywhere, not just the cb
160160
stream.emit('error', er);
@@ -204,7 +204,7 @@ Writable.prototype.write = function(chunk, encoding, cb) {
204204
cb = nop;
205205

206206
if (state.ended)
207-
writeAfterEnd(this, state, cb);
207+
writeAfterEnd(this, cb);
208208
else if (validChunk(this, state, chunk, cb)) {
209209
state.pendingcb++;
210210
ret = writeOrBuffer(this, state, chunk, encoding, cb);
@@ -329,7 +329,7 @@ function onwrite(stream, er) {
329329
onwriteError(stream, state, sync, er, cb);
330330
else {
331331
// Check if we're actually ready to finish, but don't emit yet
332-
var finished = needFinish(stream, state);
332+
var finished = needFinish(state);
333333

334334
if (!finished &&
335335
!state.corked &&
@@ -453,7 +453,7 @@ Writable.prototype.end = function(chunk, encoding, cb) {
453453
};
454454

455455

456-
function needFinish(stream, state) {
456+
function needFinish(state) {
457457
return (state.ending &&
458458
state.length === 0 &&
459459
state.bufferedRequest === null &&
@@ -469,7 +469,7 @@ function prefinish(stream, state) {
469469
}
470470

471471
function finishMaybe(stream, state) {
472-
var need = needFinish(stream, state);
472+
var need = needFinish(state);
473473
if (need) {
474474
if (state.pendingcb === 0) {
475475
prefinish(stream, state);

lib/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ function reduceToSingleString(output, base, braces) {
499499

500500
// NOTE: These type checking functions intentionally don't use `instanceof`
501501
// because it is fragile and can be easily faked with `Object.create()`.
502-
const isArray = exports.isArray = Array.isArray;
502+
exports.isArray = Array.isArray;
503503

504504
function isBoolean(arg) {
505505
return typeof arg === 'boolean';

0 commit comments

Comments
 (0)