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:
parent
ada2d053ae
commit
c50987ed58
@ -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 :
|
||||
|
Loading…
x
Reference in New Issue
Block a user