diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2018-12-03 17:15:45 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-12-10 17:07:18 +0100 |
commit | 1f85ea979ccef3c52ec4ca3263306e527b625498 (patch) | |
tree | f318be6ee905b1a04d1d2db859720c4b33b22aa8 /lib | |
parent | cc8250fab86486632fdeb63892be735d7628cd13 (diff) | |
download | android-node-v8-1f85ea979ccef3c52ec4ca3263306e527b625498.tar.gz android-node-v8-1f85ea979ccef3c52ec4ca3263306e527b625498.tar.bz2 android-node-v8-1f85ea979ccef3c52ec4ca3263306e527b625498.zip |
tools: capitalize sentences
This adds the `capitalized-comments` eslint rule to verify that
actual sentences use capital letters as starting letters. It ignores
special words and all lines below 62 characters.
PR-URL: https://github.com/nodejs/node/pull/24808
Reviewed-By: Sam Ruby <rubys@intertwingly.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/_http_agent.js | 2 | ||||
-rw-r--r-- | lib/_http_outgoing.js | 2 | ||||
-rw-r--r-- | lib/_http_server.js | 2 | ||||
-rw-r--r-- | lib/_stream_readable.js | 18 | ||||
-rw-r--r-- | lib/_stream_transform.js | 4 | ||||
-rw-r--r-- | lib/_stream_writable.js | 12 | ||||
-rw-r--r-- | lib/buffer.js | 2 | ||||
-rw-r--r-- | lib/dgram.js | 2 | ||||
-rw-r--r-- | lib/domain.js | 2 | ||||
-rw-r--r-- | lib/fs.js | 8 | ||||
-rw-r--r-- | lib/internal/child_process.js | 10 | ||||
-rw-r--r-- | lib/internal/console/constructor.js | 2 | ||||
-rw-r--r-- | lib/internal/http2/compat.js | 2 | ||||
-rw-r--r-- | lib/internal/http2/core.js | 6 | ||||
-rw-r--r-- | lib/internal/http2/util.js | 2 | ||||
-rw-r--r-- | lib/internal/modules/cjs/loader.js | 10 | ||||
-rw-r--r-- | lib/internal/modules/esm/translators.js | 2 | ||||
-rw-r--r-- | lib/internal/repl/recoverable.js | 2 | ||||
-rw-r--r-- | lib/internal/streams/destroy.js | 4 | ||||
-rw-r--r-- | lib/internal/timers.js | 2 | ||||
-rw-r--r-- | lib/net.js | 6 | ||||
-rw-r--r-- | lib/readline.js | 4 | ||||
-rw-r--r-- | lib/timers.js | 8 | ||||
-rw-r--r-- | lib/url.js | 8 | ||||
-rw-r--r-- | lib/util.js | 2 | ||||
-rw-r--r-- | lib/zlib.js | 4 |
26 files changed, 64 insertions, 64 deletions
diff --git a/lib/_http_agent.js b/lib/_http_agent.js index ac482bcfea..050e6318f3 100644 --- a/lib/_http_agent.js +++ b/lib/_http_agent.js @@ -50,7 +50,7 @@ function Agent(options) { this.options = util._extend({}, options); - // don't confuse net and make it think that we're connecting to a pipe + // Don't confuse net and make it think that we're connecting to a pipe this.options.path = null; this.requests = {}; this.sockets = {}; diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 80125f8c24..d89a34e664 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -388,7 +388,7 @@ function _storeHeader(firstLine, headers) { this._header = header + CRLF; this._headerSent = false; - // wait until the first body chunk, or close(), is sent to flush, + // Wait until the first body chunk, or close(), is sent to flush, // UNLESS we're sending Expect: 100-continue. if (state.expect) this._send(''); } diff --git a/lib/_http_server.js b/lib/_http_server.js index 22929ddc95..7e33ef1734 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -263,7 +263,7 @@ function writeHead(statusCode, reason, obj) { this._hasBody = false; } - // don't keep alive connections where the client expects 100 Continue + // Don't keep alive connections where the client expects 100 Continue // but we sent a final status; they may put extra bytes on the wire. if (this._expect_continue && !this._sent100) { this.shouldKeepAlive = false; diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index d1a17fd066..24f58bb18a 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -86,7 +86,7 @@ function ReadableState(options, stream, isDuplex) { if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - // the point at which it stops calling _read() to fill the buffer + // The point at which it stops calling _read() to fill the buffer // Note: 0 is a valid value, means "don't call _read preemptively ever" this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); @@ -103,7 +103,7 @@ function ReadableState(options, stream, isDuplex) { this.endEmitted = false; this.reading = false; - // a flag to be able to tell if the event 'readable'/'data' is emitted + // A flag to be able to tell if the event 'readable'/'data' is emitted // immediately, or on a later tick. We set this to true at first, because // any actions that shouldn't happen until "later" should generally also // not happen before the first read call. @@ -131,7 +131,7 @@ function ReadableState(options, stream, isDuplex) { // Everything else in the universe uses 'utf8', though. this.defaultEncoding = options.defaultEncoding || 'utf8'; - // the number of writers that are awaiting a drain event in .pipe()s + // The number of writers that are awaiting a drain event in .pipe()s this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled @@ -374,7 +374,7 @@ function howMuchToRead(n, state) { return state.length; } -// you can override either this method, or the async _read(n) below. +// You can override either this method, or the async _read(n) below. Readable.prototype.read = function(n) { debug('read', n); n = parseInt(n, 10); @@ -436,13 +436,13 @@ Readable.prototype.read = function(n) { var doRead = state.needReadable; debug('need readable', doRead); - // if we currently have less than the highWaterMark, then also read some + // If we currently have less than the highWaterMark, then also read some if (state.length === 0 || state.length - n < state.highWaterMark) { doRead = true; debug('length less than watermark', doRead); } - // however, if we've ended, then there's no point, and if we're already + // However, if we've ended, then there's no point, and if we're already // reading, then it's unnecessary. if (state.ended || state.reading) { doRead = false; @@ -451,7 +451,7 @@ Readable.prototype.read = function(n) { debug('do read'); state.reading = true; state.sync = true; - // if the length is currently zero, then we *need* a readable event. + // If the length is currently zero, then we *need* a readable event. if (state.length === 0) state.needReadable = true; // call internal read method @@ -554,7 +554,7 @@ function emitReadable_(stream) { } -// at this point, the user has presumably seen the 'readable' event, +// At this point, the user has presumably seen the 'readable' event, // and called read() to consume some data. that may have triggered // in turn another _read(n) call, in which case reading = true if // it's in progress. @@ -582,7 +582,7 @@ function maybeReadMore_(stream, state) { state.readingMore = false; } -// abstract method. to be overridden in specific implementation classes. +// Abstract method. to be overridden in specific implementation classes. // call cb(er, data) where data is <= n in length. // for virtual (non-string, non-buffer) streams, "length" is somewhat // arbitrary, and perhaps not very meaningful. diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js index 0a37b6a4d4..d7fcb13395 100644 --- a/lib/_stream_transform.js +++ b/lib/_stream_transform.js @@ -116,10 +116,10 @@ function Transform(options) { writeencoding: null }; - // start out asking for a readable event once data is transformed. + // Start out asking for a readable event once data is transformed. this._readableState.needReadable = true; - // we have implemented the _read method, and done the other things + // We have implemented the _read method, and done the other things // that Readable wants before the first _read call, so unset the // sync guard flag. this._readableState.sync = false; diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index c2f5a5ec4a..b317c208fb 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -90,7 +90,7 @@ function WritableState(options, stream, isDuplex) { // has it been destroyed this.destroyed = false; - // should we decode strings into buffers before passing to _write? + // Should we decode strings into buffers before passing to _write? // this is here so that some node-core streams can optimize string // handling at a lower level. var noDecode = options.decodeStrings === false; @@ -112,13 +112,13 @@ function WritableState(options, stream, isDuplex) { // when true all writes will be buffered until .uncork() call this.corked = 0; - // a flag to be able to tell if the onwrite cb is called immediately, + // A flag to be able to tell if the onwrite cb is called immediately, // or on a later tick. We set this to true at first, because any // actions that shouldn't happen until "later" should generally also // not happen before the first write call. this.sync = true; - // a flag to know if we're processing previously buffered items, which + // A flag to know if we're processing previously buffered items, which // may call the _write() callback in the same tick, so that we don't // end up in an overlapped onwrite situation. this.bufferProcessing = false; @@ -126,7 +126,7 @@ function WritableState(options, stream, isDuplex) { // the callback that's passed to _write(chunk,cb) this.onwrite = onwrite.bind(undefined, stream); - // the callback that the user supplies to write(chunk,encoding,cb) + // The callback that the user supplies to write(chunk,encoding,cb) this.writecb = null; // the amount that is being written when _write is called. @@ -139,7 +139,7 @@ function WritableState(options, stream, isDuplex) { // this must be 0 before 'finish' can be emitted this.pendingcb = 0; - // emit prefinish if the only thing we're waiting for is _write cbs + // Emit prefinish if the only thing we're waiting for is _write cbs // This is relevant for synchronous Transform streams this.prefinished = false; @@ -376,7 +376,7 @@ function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { state.length += len; var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. + // We must ensure that previous needDrain will not be reset to false. if (!ret) state.needDrain = true; diff --git a/lib/buffer.js b/lib/buffer.js index ac5e19c408..b032736f50 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -916,7 +916,7 @@ Buffer.prototype.write = function write(string, offset, length, encoding) { if (string.length > 0 && (length < 0 || offset < 0)) throw new ERR_BUFFER_OUT_OF_BOUNDS(); } else { - // if someone is still calling the obsolete form of write(), tell them. + // If someone is still calling the obsolete form of write(), tell them. // we don't want eg buf.write("foo", "utf8", 10) to silently turn into // buf.write("foo", "utf8"), so we can't ignore extra args throw new ERR_NO_LONGER_SUPPORTED( diff --git a/lib/dgram.js b/lib/dgram.js index 4751debff1..08b6a4771a 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -313,7 +313,7 @@ Socket.prototype.bind = function(port_, address_ /* , callback */) { }; -// thin wrapper around `send`, here for compatibility with dgram_legacy.js +// Thin wrapper around `send`, here for compatibility with dgram_legacy.js Socket.prototype.sendto = function(buffer, offset, length, diff --git a/lib/domain.js b/lib/domain.js index 0caeb624b4..5db92e8432 100644 --- a/lib/domain.js +++ b/lib/domain.js @@ -35,7 +35,7 @@ const { } = require('internal/errors').codes; const { createHook } = require('async_hooks'); -// overwrite process.domain with a getter/setter that will allow for more +// Overwrite process.domain with a getter/setter that will allow for more // effective optimizations var _domain = [null]; Object.defineProperty(process, 'domain', { @@ -1452,7 +1452,7 @@ function realpathSync(p, options) { let pos; // the partial path so far, including a trailing slash if any let current; - // the partial path without a trailing slash (except when pointing at a root) + // The partial path without a trailing slash (except when pointing at a root) let base; // the partial path scanned in the previous round, with slash let previous; @@ -1469,7 +1469,7 @@ function realpathSync(p, options) { knownHard[base] = true; } - // walk down the path, swapping out linked path parts for their real + // Walk down the path, swapping out linked path parts for their real // values // NB: p.length changes. while (pos < p.length) { @@ -1592,7 +1592,7 @@ function realpath(p, options, callback) { let pos; // the partial path so far, including a trailing slash if any let current; - // the partial path without a trailing slash (except when pointing at a root) + // The partial path without a trailing slash (except when pointing at a root) let base; // the partial path scanned in the previous round, with slash let previous; @@ -1611,7 +1611,7 @@ function realpath(p, options, callback) { process.nextTick(LOOP); } - // walk down the path, swapping out linked path parts for their real + // Walk down the path, swapping out linked path parts for their real // values function LOOP() { // stop if scanned past end of path diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index a0f04ab34e..b8743c0a51 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -62,7 +62,7 @@ let HTTPParser; const MAX_HANDLE_RETRANSMISSIONS = 3; -// this object contain function to convert TCP objects to native handle objects +// This object contain function to convert TCP objects to native handle objects // and back again. const handleConversion = { 'net.Native': { @@ -117,7 +117,7 @@ const handleConversion = { var handle = socket._handle; - // remove handle from socket object, it will be closed when the socket + // Remove handle from socket object, it will be closed when the socket // will be sent if (!options.keepOpen) { handle.onread = nop; @@ -166,7 +166,7 @@ const handleConversion = { writable: true }); - // if the socket was created by net.Server we will track the socket + // If the socket was created by net.Server we will track the socket if (message.key) { // add socket to connections list @@ -663,7 +663,7 @@ function setupChannel(target, channel) { // package messages with a handle object if (handle) { - // this message will be handled by an internalMessage event handler + // This message will be handled by an internalMessage event handler message = { cmd: 'NODE_HANDLE', type: null, @@ -768,7 +768,7 @@ function setupChannel(target, channel) { return channel.writeQueueSize < (65536 * 2); }; - // connected will be set to false immediately when a disconnect() is + // Connected will be set to false immediately when a disconnect() is // requested, even though the channel might still be alive internally to // process queued messages. The three states are distinguished as follows: // - disconnect() never requested: channel is not null and connected diff --git a/lib/internal/console/constructor.js b/lib/internal/console/constructor.js index f607bf4648..d3c5ed7436 100644 --- a/lib/internal/console/constructor.js +++ b/lib/internal/console/constructor.js @@ -223,7 +223,7 @@ Console.prototype[kWriteToConsole] = function(streamSymbol, string) { stream.write(string, errorHandler); } catch (e) { - // console is a debugging utility, so it swallowing errors is not desirable + // Console is a debugging utility, so it swallowing errors is not desirable // even in edge cases such as low stack space. if (isStackOverflowError(e)) throw e; diff --git a/lib/internal/http2/compat.js b/lib/internal/http2/compat.js index adf6b1da62..1783a48ada 100644 --- a/lib/internal/http2/compat.js +++ b/lib/internal/http2/compat.js @@ -231,7 +231,7 @@ function onStreamCloseRequest() { state.closed = true; req.push(null); - // if the user didn't interact with incoming data and didn't pipe it, + // If the user didn't interact with incoming data and didn't pipe it, // dump it for compatibility with http1 if (!state.didRead && !req._readableState.resumeScheduled) req.resume(); diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index a020838493..4d762611b4 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -266,7 +266,7 @@ function onSessionHeaders(handle, id, cat, flags, headers) { if (stream === undefined) { if (session.closed) { - // we are not accepting any new streams at this point. This callback + // We are not accepting any new streams at this point. This callback // should not be invoked at this point in time, but just in case it is, // refuse the stream using an RST_STREAM and destroy the handle. handle.rstStream(NGHTTP2_REFUSED_STREAM); @@ -1112,7 +1112,7 @@ class Http2Session extends EventEmitter { return this[kState].goawayLastStreamID || 0; } - // true if the Http2Session is waiting for a settings acknowledgement + // True if the Http2Session is waiting for a settings acknowledgement get pendingSettingsAck() { return this[kState].pendingAck > 0; } @@ -2235,7 +2235,7 @@ class ServerHttp2Stream extends Http2Stream { this[kSession].remoteSettings.enablePush; } - // create a push stream, call the given callback with the created + // Create a push stream, call the given callback with the created // Http2Stream for the push stream. pushStream(headers, options, callback) { if (!this.pushAllowed) diff --git a/lib/internal/http2/util.js b/lib/internal/http2/util.js index 9dc8be6e83..f62d936025 100644 --- a/lib/internal/http2/util.js +++ b/lib/internal/http2/util.js @@ -290,7 +290,7 @@ function getDefaultSettings() { return holder; } -// remote is a boolean. true to fetch remote settings, false to fetch local. +// Remote is a boolean. true to fetch remote settings, false to fetch local. // this is only called internally function getSettings(session, remote) { if (remote) diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js index 0bc721eab1..0fbb3b5cf3 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js @@ -138,7 +138,7 @@ const debug = util.debuglog('module'); Module._debug = util.deprecate(debug, 'Module._debug is deprecated.', 'DEP0077'); -// given a module name, and a list of paths to test, returns the first +// Given a module name, and a list of paths to test, returns the first // matching file in the following precedence. // // require("a.<ext>") @@ -207,7 +207,7 @@ function toRealPath(requestPath) { }); } -// given a path, check if the file exists with any of the set extensions +// Given a path, check if the file exists with any of the set extensions function tryExtensions(p, exts, isMain) { for (var i = 0; i < exts.length; i++) { const filename = tryFile(p + exts[i], isMain); @@ -452,7 +452,7 @@ Module._resolveLookupPaths = function(request, parent, newReturn) { // with --eval, parent.id is not set and parent.filename is null if (!parent || !parent.id || !parent.filename) { - // make require('./path/to/foo') work - normally the path is taken + // Make require('./path/to/foo') work - normally the path is taken // from realpath(__filename) but with eval there is no filename var mainPaths = ['.'].concat(Module._nodeModulePaths('.'), modulePaths); @@ -498,7 +498,7 @@ Module._resolveLookupPaths = function(request, parent, newReturn) { } var id = path.resolve(parentIdPath, request); - // make sure require('./path') and require('path') get distinct ids, even + // Make sure require('./path') and require('path') get distinct ids, even // when called from the toplevel js file if (parentIdPath === '.' && id.indexOf('/') === -1 && @@ -625,7 +625,7 @@ Module.prototype.load = function(filename) { const ESMLoader = asyncESM.ESMLoader; const url = `${pathToFileURL(filename)}`; const module = ESMLoader.moduleMap.get(url); - // create module entry at load time to snapshot exports correctly + // Create module entry at load time to snapshot exports correctly const exports = this.exports; if (module !== undefined) { // called from cjs translator module.reflect.onReady((reflect) => { diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js index 0d19a728aa..6bfc4c8a98 100644 --- a/lib/internal/modules/esm/translators.js +++ b/lib/internal/modules/esm/translators.js @@ -67,7 +67,7 @@ translators.set('cjs', async (url, isMain) => { } return createDynamicModule(['default'], url, () => { debug(`Loading CJSModule ${url}`); - // we don't care about the return val of _load here because Module#load + // We don't care about the return val of _load here because Module#load // will handle it for us by checking the loader registry and filling the // exports like above CJSModule._load(pathname, undefined, isMain); diff --git a/lib/internal/repl/recoverable.js b/lib/internal/repl/recoverable.js index 023de2f7ab..2c31db9faf 100644 --- a/lib/internal/repl/recoverable.js +++ b/lib/internal/repl/recoverable.js @@ -45,7 +45,7 @@ function isRecoverableError(e, code) { case 'Unterminated string constant': const token = this.input.slice(this.lastTokStart, this.pos); - // see https://www.ecma-international.org/ecma-262/#sec-line-terminators + // See https://www.ecma-international.org/ecma-262/#sec-line-terminators recoverable = /\\(?:\r\n?|\n|\u2028|\u2029)$/.test(token); } diff --git a/lib/internal/streams/destroy.js b/lib/internal/streams/destroy.js index ce9d2545e4..de6bcf9cdb 100644 --- a/lib/internal/streams/destroy.js +++ b/lib/internal/streams/destroy.js @@ -17,14 +17,14 @@ function destroy(err, cb) { return this; } - // we set destroyed to true before firing error callbacks in order + // We set destroyed to true before firing error callbacks in order // to make it re-entrance safe in case destroy() is called within callbacks if (this._readableState) { this._readableState.destroyed = true; } - // if this is a duplex stream mark the writable part as destroyed as well + // If this is a duplex stream mark the writable part as destroyed as well if (this._writableState) { this._writableState.destroyed = true; } diff --git a/lib/internal/timers.js b/lib/internal/timers.js index 3bfa1f0377..fc9979e4b5 100644 --- a/lib/internal/timers.js +++ b/lib/internal/timers.js @@ -123,7 +123,7 @@ function setUnrefTimeout(callback, after, arg1, arg2, arg3) { default: args = [arg1, arg2, arg3]; for (i = 5; i < arguments.length; i++) { - // extend array dynamically, makes .apply run much faster in v6.0.0 + // Extend array dynamically, makes .apply run much faster in v6.0.0 args[i - 2] = arguments[i]; } break; diff --git a/lib/net.js b/lib/net.js index 821647c81f..7bbabc75ba 100644 --- a/lib/net.js +++ b/lib/net.js @@ -209,7 +209,7 @@ function normalizeArgs(args) { } -// called when creating new Socket, or when re-using a closed Socket +// Called when creating new Socket, or when re-using a closed Socket function initSocketHandle(self) { self._undestroy(); self._sockname = null; @@ -1266,10 +1266,10 @@ function setupListenHandle(address, port, addressType, backlog, fd, flags) { return; } - // generate connection key, this should be unique to the connection + // Generate connection key, this should be unique to the connection this._connectionKey = addressType + ':' + address + ':' + port; - // unref the handle if the server was unref'ed prior to listening + // Unref the handle if the server was unref'ed prior to listening if (this._unref) this.unref(); diff --git a/lib/readline.js b/lib/readline.js index 5d47c51b99..fa85e4da9a 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -357,7 +357,7 @@ Interface.prototype._refreshLine = function() { // cursor position var cursorPos = this._getCursorPos(); - // first move to the bottom of the current line, based on cursor pos + // First move to the bottom of the current line, based on cursor pos var prevRows = this.prevRows || 0; if (prevRows > 0) { moveCursor(this.output, 0, -prevRows); @@ -445,7 +445,7 @@ Interface.prototype._normalWrite = function(b) { // got one or more newlines; process into "line" events var lines = string.split(lineEnding); - // either '' or (conceivably) the unfinished portion of the next line + // Either '' or (conceivably) the unfinished portion of the next line string = lines.pop(); this._line_buffer = string; for (var n = 0; n < lines.length; n++) diff --git a/lib/timers.js b/lib/timers.js index 1531cd1fb6..4f2fef449d 100644 --- a/lib/timers.js +++ b/lib/timers.js @@ -389,7 +389,7 @@ function unenroll(item) { } item[kRefed] = null; - // if active is called later, then we want to make sure not to insert again + // If active is called later, then we want to make sure not to insert again item._idleTimeout = -1; } @@ -444,7 +444,7 @@ function setTimeout(callback, after, arg1, arg2, arg3) { default: args = [arg1, arg2, arg3]; for (i = 5; i < arguments.length; i++) { - // extend array dynamically, makes .apply run much faster in v6.0.0 + // Extend array dynamically, makes .apply run much faster in v6.0.0 args[i - 2] = arguments[i]; } break; @@ -493,7 +493,7 @@ exports.setInterval = function setInterval(callback, repeat, arg1, arg2, arg3) { default: args = [arg1, arg2, arg3]; for (i = 5; i < arguments.length; i++) { - // extend array dynamically, makes .apply run much faster in v6.0.0 + // Extend array dynamically, makes .apply run much faster in v6.0.0 args[i - 2] = arguments[i]; } break; @@ -712,7 +712,7 @@ function setImmediate(callback, arg1, arg2, arg3) { default: args = [arg1, arg2, arg3]; for (i = 4; i < arguments.length; i++) { - // extend array dynamically, makes .apply run much faster in v6.0.0 + // Extend array dynamically, makes .apply run much faster in v6.0.0 args[i - 1] = arguments[i]; } break; diff --git a/lib/url.js b/lib/url.js index eac9d1511b..29dec5cc5f 100644 --- a/lib/url.js +++ b/lib/url.js @@ -461,7 +461,7 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) { this.path = p + s; } - // finally, reconstruct the href based on what has been validated. + // Finally, reconstruct the href based on what has been validated. this.href = this.format(); return this; }; @@ -629,7 +629,7 @@ Url.prototype.format = function format() { pathname = newPathname; } - // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. + // Only the slashedProtocols get the //. Not mailto:, xmpp:, etc. // unless they had them to begin with. if (this.slashes || slashedProtocol.has(protocol)) { if (this.slashes || host) { @@ -686,7 +686,7 @@ Url.prototype.resolveObject = function resolveObject(relative) { // even href="" will remove it. result.hash = relative.hash; - // if the relative url is empty, then there's nothing left to do here. + // If the relative url is empty, then there's nothing left to do here. if (relative.href === '') { result.href = result.format(); return result; @@ -888,7 +888,7 @@ Url.prototype.resolveObject = function resolveObject(relative) { } } - // if the path is allowed to go above the root, restore leading ..s + // If the path is allowed to go above the root, restore leading ..s if (!mustEndAbs && !removeAllDots) { while (up--) { srcPath.unshift('..'); diff --git a/lib/util.js b/lib/util.js index 8f7f3a92dd..389d454468 100644 --- a/lib/util.js +++ b/lib/util.js @@ -292,7 +292,7 @@ function timestamp() { return [d.getDate(), months[d.getMonth()], time].join(' '); } -// log is just a thin wrapper to console.log that prepends a timestamp +// Log is just a thin wrapper to console.log that prepends a timestamp function log() { console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); } diff --git a/lib/zlib.js b/lib/zlib.js index 92286536ce..0eb071a372 100644 --- a/lib/zlib.js +++ b/lib/zlib.js @@ -510,7 +510,7 @@ function processChunkSync(self, chunk, flushFlag) { assert(have === 0, 'have should not go down'); } - // exhausted the output buffer, or used all the input create a new one. + // Exhausted the output buffer, or used all the input create a new one. if (availOutAfter === 0 || offset >= chunkSize) { availOutBefore = chunkSize; offset = 0; @@ -599,7 +599,7 @@ function processCallback() { return; } - // exhausted the output buffer, or used all the input create a new one. + // Exhausted the output buffer, or used all the input create a new one. if (availOutAfter === 0 || self._outOffset >= self._chunkSize) { handle.availOutBefore = self._chunkSize; self._outOffset = 0; |