Skip to content

Commit 0930d7e

Browse files
ccoxwellMatheus Marchini
authored and
Matheus Marchini
committed
lib: named anonymous functions
PR-URL: #20408 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Weijia Wang <[email protected]> Reviewed-By: Matheus Marchini <[email protected]>
1 parent 4d8806f commit 0930d7e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/fs.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ fs.readFile = function(path, options, callback) {
247247
req.oncomplete = readFileAfterOpen;
248248

249249
if (context.isUserFd) {
250-
process.nextTick(function() {
250+
process.nextTick(function tick() {
251251
req.oncomplete(null, path);
252252
});
253253
return;
@@ -304,7 +304,7 @@ ReadFileContext.prototype.close = function(err) {
304304
this.err = err;
305305

306306
if (this.isUserFd) {
307-
process.nextTick(function() {
307+
process.nextTick(function tick() {
308308
req.oncomplete(null);
309309
});
310310
return;
@@ -554,7 +554,7 @@ fs.read = function(fd, buffer, offset, length, position, callback) {
554554
length |= 0;
555555

556556
if (length === 0) {
557-
return process.nextTick(function() {
557+
return process.nextTick(function tick() {
558558
callback && callback(null, 0, buffer);
559559
});
560560
}
@@ -1219,7 +1219,7 @@ function writeAll(fd, isUserFd, buffer, offset, length, position, callback) {
12191219
if (isUserFd) {
12201220
callback(writeErr);
12211221
} else {
1222-
fs.close(fd, function() {
1222+
fs.close(fd, function close() {
12231223
callback(writeErr);
12241224
});
12251225
}

0 commit comments

Comments
 (0)