Files
node/lib
Tobias Nießen 5469d04f8f lib: fix misleading argument of validateUint32
The type of the argument `positive` was declared as `boolean|number`,
which is misleading because the function treats it as a boolean only.
Some call sites even passed numbers, specifically, either `0` or `1`,
which happen to work as expected because they are interpreted as `false`
and `true`, respectively. However, passing `2` would silently lead to
unexpected behavior. Thus, strictly make the argument a boolean.

PR-URL: https://github.com/nodejs/node/pull/53307
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-06-05 22:59:05 +00:00
..
2024-05-19 05:09:09 +00:00
2023-06-24 15:52:38 +00:00
2024-06-03 22:51:17 +00:00
2024-01-12 16:09:48 +00:00
2023-06-12 00:00:46 +00:00
2023-11-11 16:25:08 +00:00
2024-05-13 13:43:16 +00:00
2024-02-02 15:25:34 +01:00
2024-03-20 17:27:29 +00:00
2024-05-30 09:07:17 -04:00
2024-05-06 09:38:08 +00:00
2024-05-02 12:54:46 +00:00