Skip to content

Commit 958ba5e

Browse files
committed
doc: update comments to use capital letters
1 parent dcc5e51 commit 958ba5e

28 files changed

+35
-35
lines changed

benchmark/fixtures/simple-http-server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ module.exports = http.createServer((req, res) => {
127127
});
128128
}
129129
}
130-
// send body in chunks
130+
// Send body in chunks
131131
if (n_chunks > 1) {
132132
const step = Math.floor(len / n_chunks) || 1;
133133
for (i = 0, n = (n_chunks - 1); i < n; ++i)

doc/api/console.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ const output = fs.createWriteStream('./stdout.log');
116116
const errorOutput = fs.createWriteStream('./stderr.log');
117117
// Custom simple logger
118118
const logger = new Console({ stdout: output, stderr: errorOutput });
119-
// use it like console
119+
// Use it like console
120120
const count = 5;
121121
logger.log('count: %d', count);
122122
// In stdout.log: count 5

doc/api/punycode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ domain name will be converted. Calling `punycode.toASCII()` on a string that
8080
already only contains ASCII characters will have no effect.
8181

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

100100
```js
101-
// decode domain names
101+
// Decode domain names
102102
punycode.toUnicode('xn--maana-pta.com'); // 'mañana.com'
103103
punycode.toUnicode('xn----dqo34k.com'); // '☃-⌘.com'
104104
punycode.toUnicode('example.com'); // 'example.com'

doc/api/util.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,7 @@ const arr = Array(101).fill(0);
770770

771771
console.log(arr); // Logs the truncated array
772772
util.inspect.defaultOptions.maxArrayLength = null;
773-
console.log(arr); // logs the full array
773+
console.log(arr); // Logs the full array
774774
```
775775

776776
## util.isDeepStrictEqual(val1, val2)

lib/_http_client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ function ClientRequest(input, options, cb) {
269269
this._deferToConnect(null, null, () => this._flush());
270270
};
271271

272-
// initiate connection
272+
// Initiate connection
273273
if (this.agent) {
274274
this.agent.addRequest(this, options);
275275
} else {

lib/internal/freeze_intrinsics.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ module.exports = function() {
218218
// this is a data property.
219219
const desc = descs[name];
220220
if ('value' in desc) {
221-
// todo uncurried form
221+
// TODO: Uncurried form
222222
enqueue(desc.value);
223223
} else {
224224
enqueue(desc.get);

lib/internal/fs/sync_write_stream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SyncWriteStream.prototype._write = function(chunk, encoding, cb) {
2525
};
2626

2727
SyncWriteStream.prototype._destroy = function(err, cb) {
28-
if (this.fd === null) // already destroy()ed
28+
if (this.fd === null) // Already destroy()ed
2929
return cb(err);
3030

3131
if (this.autoClose)

lib/internal/fs/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ function warnOnNonPortableTemplate(template) {
447447

448448
// This handles errors following the convention of the fs binding.
449449
function handleErrorFromBinding(ctx) {
450-
if (ctx.errno !== undefined) { // libuv error numbers
450+
if (ctx.errno !== undefined) { // Libuv error numbers
451451
const err = uvException(ctx);
452452
// eslint-disable-next-line no-restricted-syntax
453453
Error.captureStackTrace(err, handleErrorFromBinding);

lib/internal/readline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ function* emitKeys(stream) {
392392
// tab
393393
key.name = 'tab';
394394
} else if (ch === '\b' || ch === '\x7f') {
395-
// backspace or ctrl+h
395+
// Backspace or ctrl+h
396396
key.name = 'backspace';
397397
key.meta = escaped;
398398
} else if (ch === kEscape) {

lib/readline.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ Interface.prototype._ttyWrite = function(s, key) {
885885
this._deleteLeft();
886886
break;
887887

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

991-
case 'd': // delete forward word
991+
case 'd': // Delete forward word
992992
case 'delete':
993993
this._deleteWordRight();
994994
break;

0 commit comments

Comments
 (0)