summaryrefslogtreecommitdiff
path: root/doc/api/async_hooks.md
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2018-02-20 15:10:10 -0800
committerBenjamin Gruenbaum <benji@peer5.com>2018-02-23 02:53:21 +0200
commit9cb96ac82808254e3322119eb1e6b2a7b847741e (patch)
tree7f3be41a7e2e3e28f5b3e87258d5fc37d92829ed /doc/api/async_hooks.md
parent54cb3c5759919745c25554daffc613dbee230d37 (diff)
downloadandroid-node-v8-9cb96ac82808254e3322119eb1e6b2a7b847741e.tar.gz
android-node-v8-9cb96ac82808254e3322119eb1e6b2a7b847741e.tar.bz2
android-node-v8-9cb96ac82808254e3322119eb1e6b2a7b847741e.zip
doc: remove extraneous "for example" text
No need to announce obvious example code as being example code. Remove unneeded "for example" text as one small way to try to keep the docs more concise.. PR-URL: https://github.com/nodejs/node/pull/18890 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Diffstat (limited to 'doc/api/async_hooks.md')
-rw-r--r--doc/api/async_hooks.md8
1 files changed, 1 insertions, 7 deletions
diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md
index 1b1dfa119b..904c32acdc 100644
--- a/doc/api/async_hooks.md
+++ b/doc/api/async_hooks.md
@@ -451,8 +451,6 @@ Note that `resolve()` does not do any observable synchronous work.
rejected at this point, if the `Promise` was resolved by assuming the state
of another `Promise`.
-For example:
-
```js
new Promise((resolve) => resolve(true)).then((a) => {});
```
@@ -481,8 +479,6 @@ changes:
* Returns: {number} The `asyncId` of the current execution context. Useful to
track when something calls.
-For example:
-
```js
const async_hooks = require('async_hooks');
@@ -493,7 +489,7 @@ fs.open(path, 'r', (err, fd) => {
```
The ID returned from `executionAsyncId()` is related to execution timing, not
-causality (which is covered by `triggerAsyncId()`). For example:
+causality (which is covered by `triggerAsyncId()`):
```js
const server = net.createServer(function onConnection(conn) {
@@ -517,8 +513,6 @@ See the section on [promise execution tracking][].
* Returns: {number} The ID of the resource responsible for calling the callback
that is currently being executed.
-For example:
-
```js
const server = net.createServer((conn) => {
// The resource that caused (or triggered) this callback to be called