Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 ada7d82
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/internal/validators.js
@@ -1,3 +1,5 @@
/* eslint jsdoc/require-jsdoc: "error" */

'use strict';

const {
Expand Down Expand Up @@ -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 :
Expand Down

0 comments on commit ada7d82

Please sign in to comment.