doc: reorganize docs of module customization hooks · nodejs/node@a0adc6a · GitHub
Skip to content

Commit a0adc6a

Browse files
joyeecheungaduh95
authored andcommitted
doc: reorganize docs of module customization hooks
This reorganizes the documentation of module customization hooks to promote the synchronous variant as it has fewer caveats. Previously the documentation was organized as follows: To do something: 1. For asynchronous hooks, do this, which may have these caveats 2. For synchronous hooks, do this, which does not have the caveats To do something else: 1. For asynchronous hooks, do this, which may have these caveats 2. For synchronous hooks, do this, which does not have the caveats It's now organized as follows: Synchronous hooks: To do something, do this. To do something else, do this. (No mention that it doesn't have caveats, because users are not supposed to burden themselves with caveats in the other API that they do not use). Asynchronous hooks: They have these caveats, if they are too complex to deal with, consider use the synchronous variant. To do something, do this, which may have these caveats. To do something, do this, which may have these caveats. PR-URL: #60960 Refs: #56241 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
1 parent 2cf963d commit a0adc6a

2 files changed

Lines changed: 505 additions & 335 deletions

File tree

doc/api/cli.md

Lines changed: 4 additions & 4 deletions

0 commit comments

Comments
 (0)