Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cfa2b87

Browse filesBrowse files
TrottMylesBorins
authored andcommitted
test,lib,benchmark: match function names
In most cases, named functions match the variable or property to which they are being assigned. That also seems to be the practice in a series of PRs currently being evaluated that name currently-anonymous functions. This change applies that rule to instances in the code base that don't comply with that practice. This will be enforceable with a lint rule once we upgrade to ESLint 3.8.0. PR-URL: #9113 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
1 parent 432cb1b commit cfa2b87
Copy full SHA for cfa2b87
Expand file treeCollapse file tree

11 files changed

+17
-17
lines changed
Open diff view settings
Collapse file

‎lib/_stream_wrap.js‎

Copy file name to clipboardExpand all lines: lib/_stream_wrap.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function QueueItem(type, req) {
159159
this.next = this;
160160
}
161161

162-
StreamWrap.prototype._enqueue = function enqueue(type, req) {
162+
StreamWrap.prototype._enqueue = function _enqueue(type, req) {
163163
const item = new QueueItem(type, req);
164164
if (this._list === null) {
165165
this._list = item;
@@ -174,7 +174,7 @@ StreamWrap.prototype._enqueue = function enqueue(type, req) {
174174
return item;
175175
};
176176

177-
StreamWrap.prototype._dequeue = function dequeue(item) {
177+
StreamWrap.prototype._dequeue = function _dequeue(item) {
178178
assert(item instanceof QueueItem);
179179

180180
var next = item.next;
Collapse file

‎lib/_stream_writable.js‎

Copy file name to clipboardExpand all lines: lib/_stream_writable.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function WritableState(options, stream) {
118118
this.corkedRequestsFree = new CorkedRequest(this);
119119
}
120120

121-
WritableState.prototype.getBuffer = function writableStateGetBuffer() {
121+
WritableState.prototype.getBuffer = function getBuffer() {
122122
var current = this.bufferedRequest;
123123
var out = [];
124124
while (current) {
Collapse file

‎lib/_tls_legacy.js‎

Copy file name to clipboardExpand all lines: lib/_tls_legacy.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ CryptoStream.prototype.init = function init() {
142142
};
143143

144144

145-
CryptoStream.prototype._write = function write(data, encoding, cb) {
145+
CryptoStream.prototype._write = function _write(data, encoding, cb) {
146146
assert(this._pending === null);
147147

148148
// Black-hole data
@@ -223,7 +223,7 @@ CryptoStream.prototype._write = function write(data, encoding, cb) {
223223
};
224224

225225

226-
CryptoStream.prototype._writePending = function writePending() {
226+
CryptoStream.prototype._writePending = function _writePending() {
227227
const data = this._pending;
228228
const encoding = this._pendingEncoding;
229229
const cb = this._pendingCallback;
@@ -235,7 +235,7 @@ CryptoStream.prototype._writePending = function writePending() {
235235
};
236236

237237

238-
CryptoStream.prototype._read = function read(size) {
238+
CryptoStream.prototype._read = function _read(size) {
239239
// XXX: EOF?!
240240
if (!this.pair.ssl) return this.push(null);
241241

Collapse file

‎lib/_tls_wrap.js‎

Copy file name to clipboardExpand all lines: lib/_tls_wrap.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ proxiedMethods.forEach(function(name) {
316316
};
317317
});
318318

319-
tls_wrap.TLSWrap.prototype.close = function closeProxy(cb) {
319+
tls_wrap.TLSWrap.prototype.close = function close(cb) {
320320
let ssl;
321321
if (this.owner) {
322322
ssl = this.owner.ssl;
@@ -369,10 +369,10 @@ TLSSocket.prototype._wrapHandle = function(wrap) {
369369
res._secureContext = context;
370370
res.reading = handle.reading;
371371
Object.defineProperty(handle, 'reading', {
372-
get: function readingGetter() {
372+
get: function get() {
373373
return res.reading;
374374
},
375-
set: function readingSetter(value) {
375+
set: function set(value) {
376376
res.reading = value;
377377
}
378378
});
Collapse file

‎lib/domain.js‎

Copy file name to clipboardExpand all lines: lib/domain.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Domain.prototype._disposed = undefined;
5858

5959

6060
// Called by process._fatalException in case an error was thrown.
61-
Domain.prototype._errorHandler = function errorHandler(er) {
61+
Domain.prototype._errorHandler = function _errorHandler(er) {
6262
var caught = false;
6363
var self = this;
6464

Collapse file

‎lib/fs.js‎

Copy file name to clipboardExpand all lines: lib/fs.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ fs.truncate = function(path, len, callback) {
697697
fs.open(path, 'r+', function(er, fd) {
698698
if (er) return callback(er);
699699
var req = new FSReqWrap();
700-
req.oncomplete = function ftruncateCb(er) {
700+
req.oncomplete = function oncomplete(er) {
701701
fs.close(fd, function(er2) {
702702
callback(er || er2);
703703
});
Collapse file

‎lib/net.js‎

Copy file name to clipboardExpand all lines: lib/net.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ function Socket(options) {
189189
}
190190
util.inherits(Socket, stream.Duplex);
191191

192-
Socket.prototype._unrefTimer = function unrefTimer() {
192+
Socket.prototype._unrefTimer = function _unrefTimer() {
193193
for (var s = this; s !== null; s = s._parent)
194194
timers._unrefActive(s);
195195
};
Collapse file

‎test/parallel/test-child-process-spawn-typeerror.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-child-process-spawn-typeerror.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ assert.throws(function() {
5757
// Argument types for combinatorics
5858
const a = [];
5959
const o = {};
60-
const c = function callback() {};
60+
const c = function c() {};
6161
const s = 'string';
6262
const u = undefined;
6363
const n = null;
Collapse file

‎test/parallel/test-http-client-readable.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-client-readable.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ FakeAgent.prototype.createConnection = function createConnection() {
1515
var s = new Duplex();
1616
var once = false;
1717

18-
s._read = function read() {
18+
s._read = function _read() {
1919
if (once)
2020
return this.push(null);
2121
once = true;
@@ -27,7 +27,7 @@ FakeAgent.prototype.createConnection = function createConnection() {
2727
};
2828

2929
// Blackhole
30-
s._write = function write(data, enc, cb) {
30+
s._write = function _write(data, enc, cb) {
3131
cb();
3232
};
3333

Collapse file

‎test/parallel/test-repl-persistent-history.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-repl-persistent-history.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ const tests = [
176176
expected: [prompt, replFailedRead, prompt, replDisabled, prompt]
177177
},
178178
{ // Make sure this is always the last test, since we change os.homedir()
179-
before: function mockHomedirFailure() {
179+
before: function before() {
180180
// Mock os.homedir() failure
181181
os.homedir = function() {
182182
throw new Error('os.homedir() failure');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.