Skip to content

Commit

Permalink
doc: update comments to use capital letters
Browse files Browse the repository at this point in the history
  • Loading branch information
BridgeAR committed May 13, 2019
1 parent dcc5e51 commit 958ba5e
Show file tree
Hide file tree
Showing 28 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion benchmark/fixtures/simple-http-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ module.exports = http.createServer((req, res) => {
});
}
}
// send body in chunks
// Send body in chunks
if (n_chunks > 1) {
const step = Math.floor(len / n_chunks) || 1;
for (i = 0, n = (n_chunks - 1); i < n; ++i)
Expand Down
2 changes: 1 addition & 1 deletion doc/api/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const output = fs.createWriteStream('./stdout.log');
const errorOutput = fs.createWriteStream('./stderr.log');
// Custom simple logger
const logger = new Console({ stdout: output, stderr: errorOutput });
// use it like console
// Use it like console
const count = 5;
logger.log('count: %d', count);
// In stdout.log: count 5
Expand Down
4 changes: 2 additions & 2 deletions doc/api/punycode.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ domain name will be converted. Calling `punycode.toASCII()` on a string that
already only contains ASCII characters will have no effect.

```js
// encode domain names
// Encode domain names
punycode.toASCII('mañana.com'); // 'xn--maana-pta.com'
punycode.toASCII('☃-⌘.com'); // 'xn----dqo34k.com'
punycode.toASCII('example.com'); // 'example.com'
Expand All @@ -98,7 +98,7 @@ containing [Punycode][] encoded characters into Unicode. Only the [Punycode][]
encoded parts of the domain name are be converted.

```js
// decode domain names
// Decode domain names
punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com'
punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com'
punycode.toUnicode('example.com'); // 'example.com'
Expand Down
2 changes: 1 addition & 1 deletion doc/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ const arr = Array(101).fill(0);

console.log(arr); // Logs the truncated array
util.inspect.defaultOptions.maxArrayLength = null;
console.log(arr); // logs the full array
console.log(arr); // Logs the full array
```

## util.isDeepStrictEqual(val1, val2)
Expand Down
2 changes: 1 addition & 1 deletion lib/_http_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ function ClientRequest(input, options, cb) {
this._deferToConnect(null, null, () => this._flush());
};

// initiate connection
// Initiate connection
if (this.agent) {
this.agent.addRequest(this, options);
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/freeze_intrinsics.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ module.exports = function() {
// this is a data property.
const desc = descs[name];
if ('value' in desc) {
// todo uncurried form
// TODO: Uncurried form
enqueue(desc.value);
} else {
enqueue(desc.get);
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/fs/sync_write_stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ SyncWriteStream.prototype._write = function(chunk, encoding, cb) {
};

SyncWriteStream.prototype._destroy = function(err, cb) {
if (this.fd === null) // already destroy()ed
if (this.fd === null) // Already destroy()ed
return cb(err);

if (this.autoClose)
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/fs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ function warnOnNonPortableTemplate(template) {

// This handles errors following the convention of the fs binding.
function handleErrorFromBinding(ctx) {
if (ctx.errno !== undefined) { // libuv error numbers
if (ctx.errno !== undefined) { // Libuv error numbers
const err = uvException(ctx);
// eslint-disable-next-line no-restricted-syntax
Error.captureStackTrace(err, handleErrorFromBinding);
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/readline.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ function* emitKeys(stream) {
// tab
key.name = 'tab';
} else if (ch === '\b' || ch === '\x7f') {
// backspace or ctrl+h
// Backspace or ctrl+h
key.name = 'backspace';
key.meta = escaped;
} else if (ch === kEscape) {
Expand Down
4 changes: 2 additions & 2 deletions lib/readline.js
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ Interface.prototype._ttyWrite = function(s, key) {
this._deleteLeft();
break;

case 'd': // delete right or EOF
case 'd': // Delete right or EOF
if (this.cursor === 0 && this.line.length === 0) {
// This readline instance is finished
this.close();
Expand Down Expand Up @@ -988,7 +988,7 @@ Interface.prototype._ttyWrite = function(s, key) {
this._wordRight();
break;

case 'd': // delete forward word
case 'd': // Delete forward word
case 'delete':
this._deleteWordRight();
break;
Expand Down
2 changes: 1 addition & 1 deletion lib/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ Url.prototype.parse = function parse(url, parseQueryString, slashesDenoteHost) {
if (!hostlessProtocol.has(lowerProto) &&
(slashes || (proto && !slashedProtocol.has(proto)))) {

// there's a hostname.
// There's a hostname.
// the first instance of /, ?, ;, or # ends the host.
//
// If there is an @ in the hostname, then non-host chars *are* allowed
Expand Down
2 changes: 1 addition & 1 deletion test/async-hooks/test-ttywrap.readstream.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ hooks.enable();
if (!process.stdin.isTTY)
return common.skip('no valid readable TTY available');

// test specific setup
// Test specific setup
const checkInitOpts = { init: 1 };
const checkEndedOpts = { init: 1, before: 1, after: 1, destroy: 1 };

Expand Down
2 changes: 1 addition & 1 deletion test/async-hooks/test-ttywrap.writestream.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ hooks.enable();
if (!process.stdout.isTTY)
return common.skip('no valid writable TTY available');

// test specific setup
// Test specific setup
const checkInitOpts = { init: 1 };
const checkEndedOpts = { init: 1, before: 1, after: 1, destroy: 1 };

Expand Down
2 changes: 1 addition & 1 deletion test/message/undefined_reference_in_new_context.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const vm = require('vm');

console.error('before');

// undefined reference
// Undefined reference
vm.runInNewContext('foo.bar = 5;');

console.error('after');
2 changes: 1 addition & 1 deletion test/parallel/test-buffer-includes.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ assert.strictEqual(
true
);

// test ascii encoding
// Test ascii encoding
assert.strictEqual(
Buffer.from(b.toString('ascii'), 'ascii')
.includes('d', 0, 'ascii'),
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-buffer-indexof.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ assert.strictEqual(
3
);

// test ascii encoding
// Test ascii encoding
assert.strictEqual(
Buffer.from(b.toString('ascii'), 'ascii')
.indexOf('d', 0, 'ascii'),
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-child-process-no-deprecation.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if (process.argv[2] === 'child') {
// parent process
const spawn = require('child_process').spawn;

// spawn self as child
// Spawn self as child
const child = spawn(process.execPath, [process.argv[1], 'child']);

child.stderr.on('data', common.mustNotCall());
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-child-process-stdout-flush-exit.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (process.argv[2] === 'child') {
// parent process
const spawn = require('child_process').spawn;

// spawn self as child
// Spawn self as child
const child = spawn(process.argv[0], [process.argv[1], 'child']);

let stdout = '';
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-utimes.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function runTests(iter) {
fs.utimes('foobarbaz', atime, mtime, common.mustCall((err) => {
expect_errno('utimes', 'foobarbaz', err, 'ENOENT');

// don't close this fd
// Don't close this fd
if (common.isWindows) {
fd = fs.openSync(tmpdir.path, 'r+');
} else {
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-module-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require('../common');
const assert = require('assert');

// check for existence
// Check for existence
assert(process.config.variables.hasOwnProperty('node_module_version'));

// Ensure that `node_module_version` is an Integer > 0
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-os.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ is.string(arch);
assert.ok(arch.length > 0);

if (!common.isSunOS) {
// not implemented yet
// Not implemented yet
assert.ok(os.loadavg().length > 0);
assert.ok(os.freemem() > 0);
assert.ok(os.totalmem() > 0);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-readline-interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function isWarned(emitter) {
rli.close();
}

// sending a full line
// Sending a full line
{
const fi = new FakeInput();
const rli = new readline.Interface(
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-repl-pretty-custom-stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const tests = [
command: 'foo = bar;',
expected: 'Thrown:\nReferenceError: bar is not defined\n'
},
// test anonymous IIFE
// Test anonymous IIFE
{
command: '(function() { throw new Error(\'Whoops!\'); })()',
expected: 'Thrown:\nError: Whoops!--->\nrepl:1:21\n'
Expand Down
12 changes: 6 additions & 6 deletions test/parallel/test-tls-alpn-server-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ function Test3() {
}];

runTest(clientsOptions, serverOptions, function(results) {
// nothing is selected
// Nothing is selected
checkResults(results[0], { server: { ALPN: false },
client: { ALPN: false } });
// nothing is selected
// Nothing is selected
checkResults(results[1], { server: { ALPN: false },
client: { ALPN: false } });
// nothing is selected
// Nothing is selected
checkResults(results[2],
{ server: { ALPN: false },
client: { ALPN: false } });
Expand All @@ -150,13 +150,13 @@ function Test4() {
const clientsOptions = [{}, {}, {}];

runTest(clientsOptions, serverOptions, function(results) {
// nothing is selected
// Nothing is selected
checkResults(results[0], { server: { ALPN: false },
client: { ALPN: false } });
// nothing is selected
// Nothing is selected
checkResults(results[1], { server: { ALPN: false },
client: { ALPN: false } });
// nothing is selected
// Nothing is selected
checkResults(results[2],
{ server: { ALPN: false },
client: { ALPN: false } });
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tls-handshake-nohang.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ if (!common.hasCrypto)

const tls = require('tls');

// neither should hang
// Neither should hang
tls.createSecurePair(null, false, false, false);
tls.createSecurePair(null, true, false, false);
2 changes: 1 addition & 1 deletion test/parallel/test-tls-inception.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const a = tls.createServer(options, function(socket) {
});
});

// the "target" server
// The "target" server
const b = tls.createServer(options, function(socket) {
socket.end(body);
});
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-cli-syntax-file-not-found.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const syntaxArgs = [

const notFoundRE = /^Error: Cannot find module/m;

// test file not found
// Test file not found
[
'syntax/file_not_found.js',
'syntax/file_not_found'
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-stream2-stderr-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function parent() {
});
}

// using console.error
// Using console.error
function child0() {
console.error('child 0');
console.error('foo');
Expand Down

0 comments on commit 958ba5e

Please sign in to comment.