From f8763bb077db2f0be74e353c0b4f9e353c0fffa8 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Thu, 7 Mar 2019 01:03:53 +0100 Subject: benchmark,doc,lib,test: capitalize comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/26483 Reviewed-By: Vse Mozhet Byt Reviewed-By: Michaƫl Zasso --- lib/fs.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/fs.js') diff --git a/lib/fs.js b/lib/fs.js index ccd1ff2756..46f26fe9eb 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -368,7 +368,7 @@ function readFileSync(path, options) { } while (bytesRead !== 0 && pos < size); } else { do { - // the kernel lies about many files. + // The kernel lies about many files. // Go ahead and try to read some bytes. buffer = Buffer.allocUnsafe(8192); bytesRead = tryReadSync(fd, isUserFd, buffer, 0, 8192); @@ -1445,7 +1445,7 @@ function realpathSync(p, options) { const knownHard = Object.create(null); const original = p; - // current character position in p + // Current character position in p let pos; // The partial path so far, including a trailing slash if any let current; @@ -1512,7 +1512,7 @@ function realpathSync(p, options) { continue; } - // read the link if it wasn't read before + // Read the link if it wasn't read before // dev/ino always return 0 on windows, so skip the check. let linkTarget = null; let id; @@ -1537,7 +1537,7 @@ function realpathSync(p, options) { if (!isWindows) seenLinks[id] = linkTarget; } - // resolve the link, then start over + // Resolve the link, then start over p = pathModule.resolve(resolvedLink, p.slice(pos)); // Skip over roots @@ -1585,7 +1585,7 @@ function realpath(p, options, callback) { const seenLinks = Object.create(null); const knownHard = Object.create(null); - // current character position in p + // Current character position in p let pos; // The partial path so far, including a trailing slash if any let current; @@ -1611,7 +1611,7 @@ function realpath(p, options, callback) { // Walk down the path, swapping out linked path parts for their real // values function LOOP() { - // stop if scanned past end of path + // Stop if scanned past end of path if (pos >= p.length) { return callback(null, encodeRealpathResult(p, options)); } @@ -1651,9 +1651,9 @@ function realpath(p, options, callback) { return process.nextTick(LOOP); } - // stat & read the link if not read before - // call gotTarget as soon as the link target is known - // dev/ino always return 0 on windows, so skip the check. + // Stat & read the link if not read before. + // Call `gotTarget()` as soon as the link target is known. + // `dev`/`ino` always return 0 on windows, so skip the check. let id; if (!isWindows) { const dev = stats.dev.toString(32); @@ -1680,7 +1680,7 @@ function realpath(p, options, callback) { } function gotResolvedLink(resolvedLink) { - // resolve the link, then start over + // Resolve the link, then start over p = pathModule.resolve(resolvedLink, p.slice(pos)); current = base = splitRoot(p); pos = current.length; -- cgit v1.2.1