Skip to content

Commit

Permalink
doc: add change entry
Browse files Browse the repository at this point in the history
Added a change entry for the stricter validation of the `address`
parameter in `Socket.prototype.send()`.

doc: use nullish instead of falsy

Used nullish instead of falsy to point at that
the parameter now only accepts a `string`,
`null` or `undefined`.
  • Loading branch information
VoltrexKeyva committed Jul 31, 2021
1 parent a67307a commit 17cf05b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/api/dgram.md
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,10 @@ if the socket is not connected.
<!-- YAML
added: v0.1.99
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/39190
description: The `address` parameter now only accepts a `string`, `null`
or `undefined`.
- version:
- v14.5.0
- v12.19.0
Expand Down Expand Up @@ -517,7 +521,7 @@ If `msg` is an array, `offset` and `length` must not be specified.

The `address` argument is a string. If the value of `address` is a host name,
DNS will be used to resolve the address of the host. If `address` is not
provided or otherwise falsy, `'127.0.0.1'` (for `udp4` sockets) or `'::1'`
provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'`
(for `udp6` sockets) will be used by default.

If the socket has not been previously bound with a call to `bind`, the socket
Expand Down

0 comments on commit 17cf05b

Please sign in to comment.