node/doc/api
Domenic Denicola fbd93d4c1c doc: more use-cases for promise events
This adds an example of a semi-common promise pattern that could
result in false-positive 'unhandledRejection' events, to help motivate
why there is a dual 'rejectionHandled' event. I anticipate it being
helpful to users who encounter 'unhandledRejection' events that do not
stem from obvious typos such as the JSON.pasre example.

Also cleans up the promise rejection tracking sample. By using a Map
instead of array we can get O(1) deletion and actually record the errors.
And, fixed indentation and backtick usage there to align with the rest of
the document.

Reviewed-By: Stephan Belanger <admin@stephenbelanger.com>
Reviewed-By: Petka Antonov <petka.antonov@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3438
2015-10-30 10:07:47 -07:00
..
_toc.markdown deps: update v8 to 4.4.63.9 2015-08-04 11:56:14 -07:00
addons.markdown doc: replace node-gyp link with nodejs/node-gyp 2015-10-12 06:41:21 -07:00
all.markdown deps: update v8 to 4.4.63.9 2015-08-04 11:56:14 -07:00
assert.markdown doc: add information about Assert behavior and maintenance 2015-10-29 08:38:40 -07:00
buffer.markdown doc: binary encoding is not deprecated 2015-10-30 10:07:47 -07:00
child_process.markdown docs: add missing shell option to execSync 2015-10-29 08:38:41 -07:00
cluster.markdown doc: remove old note, 'cluster' is marked stable 2015-10-30 10:07:47 -07:00
console.markdown doc: document Console class 2015-04-11 06:47:30 +02:00
crypto.markdown doc: show keylen in pbkdf2 as a byte length 2015-10-29 08:38:40 -07:00
debugger.markdown node: rename from io.js to node 2015-08-23 17:59:43 -04:00
dgram.markdown doc: port is optional for socket.bind() 2015-08-25 18:52:20 -07:00
dns.markdown doc: add method links in dns.markdown 2015-10-10 10:37:03 -07:00
documentation.markdown node: rename from io.js to node 2015-08-23 17:59:43 -04:00
domain.markdown doc: small typo in domain.markdown 2015-08-25 18:52:05 -07:00
errors.markdown doc: fix typos in cluster & errors 2015-09-24 22:09:44 -07:00
events.markdown doc: recommend Infinity on emitter.setMaxListeners 2015-10-10 10:34:39 -07:00
fs.markdown doc: copyedit fs.watch() information 2015-10-02 13:39:24 +10:00
globals.markdown doc: minor additional corrections and improvements 2015-08-25 18:52:52 -07:00
http.markdown doc: mention the behaviour if URL is invalid 2015-10-29 08:38:44 -07:00
https.markdown node: rename from io.js to node 2015-08-23 17:59:43 -04:00
index.markdown
modules.markdown doc: remove usage of events.EventEmitter 2015-09-23 08:39:34 +10:00
net.markdown doc: Amend capitalization of word JavaScript 2015-10-10 10:38:01 -07:00
os.markdown os: add homedir() 2015-06-05 22:58:14 -04:00
path.markdown doc: update path.extname documentation 2015-08-25 18:51:41 -07:00
process.markdown doc: more use-cases for promise events 2015-10-30 10:07:47 -07:00
punycode.markdown node: rename from io.js to node 2015-08-23 17:59:43 -04:00
querystring.markdown doc: add explanations for querystring 2015-03-03 10:03:42 -05:00
readline.markdown node: rename from io.js to node 2015-08-23 17:59:43 -04:00
repl.markdown doc: fix broken link in repl.markdown 2015-09-14 21:50:59 -04:00
stream.markdown doc: fix two doc errors in stream and process 2015-09-14 21:50:58 -04:00
string_decoder.markdown doc: update stability index 2015-02-27 14:23:01 -08:00
synopsis.markdown node: additional cleanup for node rename 2015-08-23 17:59:43 -04:00
timers.markdown timer: ref/unref return self 2015-09-16 16:07:58 -04:00
tls.markdown doc: createServer's key option can be an array 2015-10-30 10:07:47 -07:00
tty.markdown doc: make the deprecations consistent 2015-08-24 13:38:37 +05:30
url.markdown doc: update url doc to account for escaping 2015-09-06 21:38:59 +10:00
util.markdown doc: remove usage of events.EventEmitter 2015-09-23 08:39:34 +10:00
v8.markdown node: rename from io.js to node 2015-08-23 17:59:43 -04:00
vm.markdown doc: fix vm module examples 2015-03-13 23:14:20 +01:00
zlib.markdown node: rename from io.js to node 2015-08-23 17:59:43 -04:00