doc: adds mjs examples to node:child_process
#53788
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've added
mjs
examples for the child_process documentation.I've tested every single example (except for the Windows ones because I don't own a Windows machine☹️ ) on my machine and they all work/behave as expected.
I've refrained from making any changes to the
cjs
examples except for the one inchild_process.fork(modulePath[, args][, options])
where therequire
statement was inside a condition. I took the liberty to put therequire
statement at the top of the example; If you don't like that I can revert that change.Thanks in advance for all your hard work, I hope this PRs are helpful 😊 (and not bothersome 🙈)
Best regards ❤️