Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: remove unused variables #1290

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 5 additions & 5 deletions lib/_stream_writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Writable.prototype.pipe = function() {
};


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

if (state.ended)
writeAfterEnd(this, state, cb);
writeAfterEnd(this, cb);
else if (validChunk(this, state, chunk, cb)) {
state.pendingcb++;
ret = writeOrBuffer(this, state, chunk, encoding, cb);
Expand Down Expand Up @@ -329,7 +329,7 @@ function onwrite(stream, er) {
onwriteError(stream, state, sync, er, cb);
else {
// Check if we're actually ready to finish, but don't emit yet
var finished = needFinish(stream, state);
var finished = needFinish(state);

if (!finished &&
!state.corked &&
Expand Down Expand Up @@ -453,7 +453,7 @@ Writable.prototype.end = function(chunk, encoding, cb) {
};


function needFinish(stream, state) {
function needFinish(state) {
return (state.ending &&
state.length === 0 &&
state.bufferedRequest === null &&
Expand All @@ -469,7 +469,7 @@ function prefinish(stream, state) {
}

function finishMaybe(stream, state) {
var need = needFinish(stream, state);
var need = needFinish(state);
if (need) {
if (state.pendingcb === 0) {
prefinish(stream, state);
Expand Down
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ function reduceToSingleString(output, base, braces) {

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

function isBoolean(arg) {
return typeof arg === 'boolean';
Expand Down