Skip to content

Commit 6d84289

Browse files
mscdextrevnorris
authored andcommitted
lib: remove unused variables and functions
1 parent 1f9f863 commit 6d84289

19 files changed

+5
-50
lines changed

lib/_debugger.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -739,8 +739,7 @@ function SourceInfo(body) {
739739
// This class is the repl-enabled debugger interface which is invoked on
740740
// "node debug"
741741
function Interface(stdin, stdout, args) {
742-
var self = this,
743-
child;
742+
var self = this;
744743

745744
this.stdin = stdin;
746745
this.stdout = stdout;

lib/_http_agent.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,6 @@ Agent.prototype.addRequest = function(req, options) {
142142
};
143143
}
144144

145-
var host = options.host;
146-
var port = options.port;
147-
var localAddress = options.localAddress;
148-
149145
var name = this.getName(options);
150146
if (!this.sockets[name]) {
151147
this.sockets[name] = [];

lib/_http_client.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ var IncomingMessage = require('_http_incoming').IncomingMessage;
3636
var OutgoingMessage = require('_http_outgoing').OutgoingMessage;
3737

3838
var agent = require('_http_agent');
39-
var Agent = agent.Agent;
4039
var globalAgent = agent.globalAgent;
4140

4241

@@ -308,7 +307,6 @@ function socketOnData(d) {
308307

309308
// client
310309
function parserOnIncomingClient(res, shouldKeepAlive) {
311-
var parser = this;
312310
var socket = this.socket;
313311
var req = socket._httpMessage;
314312

lib/_http_outgoing.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ var common = require('_http_common');
2828

2929
var CRLF = common.CRLF;
3030
var chunkExpression = common.chunkExpression;
31-
var continueExpression = common.continueExpression;
3231
var debug = common.debug;
3332

3433

@@ -194,7 +193,6 @@ OutgoingMessage.prototype._storeHeader = function(firstLine, headers) {
194193
};
195194

196195
var field, value;
197-
var self = this;
198196

199197
if (headers) {
200198
var keys = Object.keys(headers);
@@ -457,7 +455,6 @@ OutgoingMessage.prototype.addTrailers = function(headers) {
457455
};
458456

459457

460-
var zero_chunk_buf = new Buffer('\r\n0\r\n');
461458
var crlf_buf = new Buffer('\r\n');
462459

463460

lib/_stream_readable.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,6 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
582582

583583
function pipeOnDrain(src) {
584584
return function() {
585-
var dest = this;
586585
var state = src._readableState;
587586
debug('pipeOnDrain', state.awaitDrain);
588587
if (state.awaitDrain)

lib/_stream_transform.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function Transform(options) {
112112

113113
Duplex.call(this, options);
114114

115-
var ts = this._transformState = new TransformState(options, this);
115+
this._transformState = new TransformState(options, this);
116116

117117
// when the writable side finishes, then flush out anything remaining.
118118
var stream = this;
@@ -192,7 +192,6 @@ function done(stream, er) {
192192
// if there's nothing in the write buffer, then that means
193193
// that nothing more will ever be provided
194194
var ws = stream._writableState;
195-
var rs = stream._readableState;
196195
var ts = stream._transformState;
197196

198197
if (ws.length)

lib/_stream_writable.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ module.exports = Writable;
2727
Writable.WritableState = WritableState;
2828

2929
var util = require('util');
30-
var assert = require('assert');
3130
var Stream = require('stream');
3231

3332
util.inherits(Writable, Stream);

lib/_tls_wrap.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
var assert = require('assert');
22
var constants = require('constants');
33
var crypto = require('crypto');
4-
var events = require('events');
54
var net = require('net');
65
var tls = require('tls');
76
var util = require('util');
@@ -132,8 +131,6 @@ function TLSSocket(socket, options) {
132131
writable: socket.writable
133132
});
134133

135-
var self = this;
136-
137134
this._tlsOptions = options;
138135
this._secureEstablished = false;
139136
this._controlReleased = false;

lib/buffer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
var buffer = process.binding('buffer');
2323
var smalloc = process.binding('smalloc');
24-
var assert = require('assert');
2524
var util = require('util');
2625
var alloc = smalloc.alloc;
2726
var sliceOnto = smalloc.sliceOnto;

lib/child_process.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ var handleConversion = {
104104
},
105105

106106
got: function(message, handle, emit) {
107-
var self = this;
108-
109107
var server = new net.Server();
110108
server.listen(handle, function() {
111109
emit(server);
@@ -199,8 +197,6 @@ var handleConversion = {
199197
function SocketListSend(slave, key) {
200198
EventEmitter.call(this);
201199

202-
var self = this;
203-
204200
this.key = key;
205201
this.slave = slave;
206202
}
@@ -585,7 +581,7 @@ exports.exec = function(command /*, options, callback */) {
585581

586582

587583
exports.execFile = function(file /* args, options, callback */) {
588-
var args, optionArg, callback;
584+
var args, callback;
589585
var options = {
590586
encoding: 'utf8',
591587
timeout: 0,

0 commit comments

Comments
 (0)