summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-01-21 01:22:27 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2019-02-28 18:31:10 +0100
commit9edce1e12a7b69e7986dd15fce18d6e46590161a (patch)
treec5d37d8016a27bab698520ecc51cda4f7ad99d40 /doc
parent7b674697d8005c29391ebaaf562eb4d92ed9b129 (diff)
downloadandroid-node-v8-9edce1e12a7b69e7986dd15fce18d6e46590161a.tar.gz
android-node-v8-9edce1e12a7b69e7986dd15fce18d6e46590161a.tar.bz2
android-node-v8-9edce1e12a7b69e7986dd15fce18d6e46590161a.zip
benchmark,doc,lib,test: capitalize comments
This updates a lot of comments. PR-URL: https://github.com/nodejs/node/pull/26223 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/child_process.md2
-rw-r--r--doc/api/domain.md10
-rw-r--r--doc/api/http.md2
-rw-r--r--doc/api/http2.md6
-rw-r--r--doc/api/inspector.md2
-rw-r--r--doc/api/querystring.md2
-rw-r--r--doc/api/stream.md8
-rw-r--r--doc/api/util.md2
8 files changed, 17 insertions, 17 deletions
diff --git a/doc/api/child_process.md b/doc/api/child_process.md
index 9586b662eb..a6064ee3c7 100644
--- a/doc/api/child_process.md
+++ b/doc/api/child_process.md
@@ -1070,7 +1070,7 @@ const subprocess = spawn(
);
setTimeout(() => {
- subprocess.kill(); // does not terminate the node process in the shell
+ subprocess.kill(); // Does not terminate the node process in the shell
}, 2000);
```
diff --git a/doc/api/domain.md b/doc/api/domain.md
index 5ed1de4a4a..0f53e958bd 100644
--- a/doc/api/domain.md
+++ b/doc/api/domain.md
@@ -128,7 +128,7 @@ if (cluster.isMaster) {
// Anything can happen now! Be very careful!
try {
- // make sure we close down within 30 seconds
+ // Make sure we close down within 30 seconds
const killtimer = setTimeout(() => {
process.exit(1);
}, 30000);
@@ -148,7 +148,7 @@ if (cluster.isMaster) {
res.setHeader('content-type', 'text/plain');
res.end('Oops, there was a problem!\n');
} catch (er2) {
- // oh well, not much we can do at this point.
+ // Oh well, not much we can do at this point.
console.error(`Error sending 500! ${er2.stack}`);
}
});
@@ -240,13 +240,13 @@ perhaps we would like to have a separate domain to use for each request.
That is possible via explicit binding.
```js
-// create a top-level domain for the server
+// Create a top-level domain for the server
const domain = require('domain');
const http = require('http');
const serverDomain = domain.create();
serverDomain.run(() => {
- // server is created in the scope of serverDomain
+ // Server is created in the scope of serverDomain
http.createServer((req, res) => {
// Req and res are also created in the scope of serverDomain
// however, we'd prefer to have a separate domain for each request.
@@ -373,7 +373,7 @@ const d = domain.create();
function readSomeFile(filename, cb) {
fs.readFile(filename, 'utf8', d.intercept((data) => {
- // note, the first argument is never passed to the
+ // Note, the first argument is never passed to the
// callback since it is assumed to be the 'Error' argument
// and thus intercepted by the domain.
diff --git a/doc/api/http.md b/doc/api/http.md
index 9e6b6e4264..57ba9302b8 100644
--- a/doc/api/http.md
+++ b/doc/api/http.md
@@ -101,7 +101,7 @@ http.get({
hostname: 'localhost',
port: 80,
path: '/',
- agent: false // create a new agent just for this one request
+ agent: false // Create a new agent just for this one request
}, (res) => {
// Do stuff with response
});
diff --git a/doc/api/http2.md b/doc/api/http2.md
index da2201d55c..4ebc490213 100644
--- a/doc/api/http2.md
+++ b/doc/api/http2.md
@@ -2598,7 +2598,7 @@ const server = createSecureServer(
).listen(4443);
function onRequest(req, res) {
- // detects if it is a HTTPS request or HTTP/2
+ // Detects if it is a HTTPS request or HTTP/2
const { socket: { alpnProtocol } } = req.httpVersion === '2.0' ?
req.stream.session : req;
res.writeHead(200, { 'content-type': 'application/json' });
@@ -3371,9 +3371,9 @@ const obs = new PerformanceObserver((items) => {
const entry = items.getEntries()[0];
console.log(entry.entryType); // prints 'http2'
if (entry.name === 'Http2Session') {
- // entry contains statistics about the Http2Session
+ // Entry contains statistics about the Http2Session
} else if (entry.name === 'Http2Stream') {
- // entry contains statistics about the Http2Stream
+ // Entry contains statistics about the Http2Stream
}
});
obs.observe({ entryTypes: ['http2'] });
diff --git a/doc/api/inspector.md b/doc/api/inspector.md
index 6af8b90aaf..0a11f6a1ff 100644
--- a/doc/api/inspector.md
+++ b/doc/api/inspector.md
@@ -167,7 +167,7 @@ session.connect();
session.post('Profiler.enable', () => {
session.post('Profiler.start', () => {
- // invoke business logic under measurement here...
+ // Invoke business logic under measurement here...
// some time later...
session.post('Profiler.stop', (err, { profile }) => {
diff --git a/doc/api/querystring.md b/doc/api/querystring.md
index 60230d916b..67475601af 100644
--- a/doc/api/querystring.md
+++ b/doc/api/querystring.md
@@ -109,7 +109,7 @@ Any other input values will be coerced to empty strings.
```js
querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' });
-// returns 'foo=bar&baz=qux&baz=quux&corge='
+// Returns 'foo=bar&baz=qux&baz=quux&corge='
querystring.stringify({ foo: 'bar', baz: 'qux' }, ';', ':');
// returns 'foo:bar;baz:qux'
diff --git a/doc/api/stream.md b/doc/api/stream.md
index 14bc50d310..c9d4b035dd 100644
--- a/doc/api/stream.md
+++ b/doc/api/stream.md
@@ -135,7 +135,7 @@ const server = http.createServer((req, res) => {
req.on('end', () => {
try {
const data = JSON.parse(body);
- // write back something interesting to the user:
+ // Write back something interesting to the user:
res.write(typeof data);
res.end();
} catch (er) {
@@ -413,7 +413,7 @@ Calling the [`stream.write()`][stream-write] method after calling
[`stream.end()`][stream-end] will raise an error.
```js
-// write 'hello, ' and then end with 'world!'
+// Write 'hello, ' and then end with 'world!'
const fs = require('fs');
const file = fs.createWriteStream('example.txt');
file.write('hello, ');
@@ -684,7 +684,7 @@ pass.unpipe(writable);
pass.on('data', (chunk) => { console.log(chunk.toString()); });
pass.write('ok'); // will not emit 'data'
-pass.resume(); // must be called to make stream emit 'data'
+pass.resume(); // Must be called to make stream emit 'data'
```
While `readable.readableFlowing` is `false`, data may be accumulating
@@ -1211,7 +1211,7 @@ function parseHeader(stream, callback) {
const remaining = split.join('\n\n');
const buf = Buffer.from(remaining, 'utf8');
stream.removeListener('error', callback);
- // remove the 'readable' listener before unshifting
+ // Remove the 'readable' listener before unshifting
stream.removeListener('readable', onReadable);
if (buf.length)
stream.unshift(buf);
diff --git a/doc/api/util.md b/doc/api/util.md
index b1d4854997..d53e18b217 100644
--- a/doc/api/util.md
+++ b/doc/api/util.md
@@ -158,7 +158,7 @@ const util = require('util');
const fn1 = util.deprecate(someFunction, someMessage, 'DEP0001');
const fn2 = util.deprecate(someOtherFunction, someOtherMessage, 'DEP0001');
-fn1(); // emits a deprecation warning with code DEP0001
+fn1(); // Emits a deprecation warning with code DEP0001
fn2(); // Does not emit a deprecation warning because it has the same code
```