lib: require JSDoc in internal validators code

Closes: https://github.com/nodejs/node/issues/44893
PR-URL: https://github.com/nodejs/node/pull/44896
Fixes: https://github.com/nodejs/node/issues/44893
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Rich Trott authored and Danielle Adams committed 2022-10-11 09:08:30 -04:00
1 parent b6b9c427c5
commit ada7d82b16
1 file changed
+8
+8
View File
@@ -1,3 +1,5 @@
/* eslint jsdoc/require-jsdoc: "error" */
'use strict';
const {
@@ -217,6 +219,12 @@ function validateBoolean(value, name) {
throw new ERR_INVALID_ARG_TYPE(name, 'boolean', value);
}
/**
* @param {?object} options
* @param {string} key
* @param {boolean} defaultValue
* @returns {boolean}
*/
function getOwnPropertyValueOrDefault(options, key, defaultValue) {
return options == null || !ObjectPrototypeHasOwnProperty(options, key) ?
defaultValue :