-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
doc: remove redundant 'Example:' and similar notes #22537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -552,17 +552,16 @@ chained. | |
| ### Change to asynchronous `socket.bind()` behavior | ||
|
|
||
| As of Node.js v0.10, [`dgram.Socket#bind()`][] changed to an asynchronous | ||
| execution model. Legacy code that assumes synchronous behavior, as in the | ||
| following example: | ||
| execution model. Legacy code would use syncrhronous behavior: | ||
|
|
||
| ```js | ||
| const s = dgram.createSocket('udp4'); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Super tiny Nit: If we say, this is some code which used to work in older versions, I think it would be better to change this
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems some latest versions before the change support > process.versions
{ http_parser: '1.0',
node: '0.8.28',
v8: '3.11.10.26',
ares: '1.7.5-DEV',
uv: '0.8',
zlib: '1.2.3',
openssl: '1.0.0m' }
> const a = 1;
undefined
> a
1
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But I can change (with linter disabling comment) if it makes the difference more obvious. |
||
| s.bind(1234); | ||
| s.addMembership('224.0.0.114'); | ||
| ``` | ||
|
|
||
| must be changed to pass a callback function to the [`dgram.Socket#bind()`][] | ||
| function: | ||
| Such legacy code would need to be changed to pass a callback function to the | ||
| [`dgram.Socket#bind()`][] function: | ||
|
|
||
| ```js | ||
| const s = dgram.createSocket('udp4'); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/syncrhronous/synchronous/