Skip to content

Commit 17cf05b

Browse files
committed
doc: add change entry
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`.
1 parent a67307a commit 17cf05b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

doc/api/dgram.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,10 @@ if the socket is not connected.
468468
<!-- YAML
469469
added: v0.1.99
470470
changes:
471+
- version: REPLACEME
472+
pr-url: https://github.com/nodejs/node/pull/39190
473+
description: The `address` parameter now only accepts a `string`, `null`
474+
or `undefined`.
471475
- version:
472476
- v14.5.0
473477
- v12.19.0
@@ -517,7 +521,7 @@ If `msg` is an array, `offset` and `length` must not be specified.
517521

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

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

0 commit comments

Comments
 (0)