Skip to content
Permalink
Browse files
lib: require JSDoc in internal validators code
Closes: #44893
PR-URL: #44896
Fixes: #44893
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Trott authored and danielleadams committed Oct 11, 2022
1 parent b6b9c42 commit ada7d82b162a4834ca587d968cd5c22f76f6d7db
Showing 1 changed file with 8 additions and 0 deletions.
@@ -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 :

0 comments on commit ada7d82

Please sign in to comment.