summaryrefslogtreecommitdiff
path: root/doc/api/domain.md
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-03-22 03:44:26 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2019-03-27 17:20:06 +0100
commitb08a867d6016ccf04783a0f91fdbcc3460daf234 (patch)
tree5df4b30220cde5ae5eac9ed956c9badac6ba08af /doc/api/domain.md
parentfd992e6e36bb4b01a6ceb71cfeb3bae640b492a6 (diff)
downloadandroid-node-v8-b08a867d6016ccf04783a0f91fdbcc3460daf234.tar.gz
android-node-v8-b08a867d6016ccf04783a0f91fdbcc3460daf234.tar.bz2
android-node-v8-b08a867d6016ccf04783a0f91fdbcc3460daf234.zip
benchmark,doc,lib: capitalize more comments
PR-URL: https://github.com/nodejs/node/pull/26849 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Diffstat (limited to 'doc/api/domain.md')
-rw-r--r--doc/api/domain.md12
1 files changed, 5 insertions, 7 deletions
diff --git a/doc/api/domain.md b/doc/api/domain.md
index 226eb660f4..63dbcabbbc 100644
--- a/doc/api/domain.md
+++ b/doc/api/domain.md
@@ -135,7 +135,7 @@ if (cluster.isMaster) {
// But don't keep the process open just for that!
killtimer.unref();
- // stop taking new requests.
+ // Stop taking new requests.
server.close();
// Let the master know we're dead. This will trigger a
@@ -316,14 +316,13 @@ const d = domain.create();
function readSomeFile(filename, cb) {
fs.readFile(filename, 'utf8', d.bind((er, data) => {
- // If this throws, it will also be passed to the domain
+ // If this throws, it will also be passed to the domain.
return cb(er, data ? JSON.parse(data) : null);
}));
}
d.on('error', (er) => {
- // an error occurred somewhere.
- // if we throw it now, it will crash the program
+ // An error occurred somewhere. If we throw it now, it will crash the program
// with the normal line number and stack message.
});
```
@@ -377,7 +376,7 @@ function readSomeFile(filename, cb) {
// callback since it is assumed to be the 'Error' argument
// and thus intercepted by the domain.
- // if this throws, it will also be passed to the domain
+ // If this throws, it will also be passed to the domain
// so the error-handling logic can be moved to the 'error'
// event on the domain instead of being repeated throughout
// the program.
@@ -386,8 +385,7 @@ function readSomeFile(filename, cb) {
}
d.on('error', (er) => {
- // an error occurred somewhere.
- // if we throw it now, it will crash the program
+ // An error occurred somewhere. If we throw it now, it will crash the program
// with the normal line number and stack message.
});
```