Fix makeValidator returning required: boolean

This commit is contained in:
Michael B. Gale
2026-07-29 11:19:21 +01:00
parent eb692f8b49
commit e893985e8b
2 changed files with 4 additions and 7 deletions

4
lib/entry-points.js generated
View File

@@ -144598,11 +144598,11 @@ function isStringOrUndefined(value) {
function defaultCheck(validate) {
return (arg) => ({ unknownKeys: [], invalidKeys: [], valid: validate(arg) });
}
function makeValidator(validate, required = true) {
function makeValidator(validate) {
return {
validate,
check: defaultCheck(validate),
required
required: true
};
}
var string = makeValidator(isString);