I saw a codebase which was using joi library like this:
function f(a, b) {
// ...
}
f.schema = {
a: Joi.string().uuid().required(),
b: Joi.number()
}
And then the f.schema property wasn't referenced anywhere else. Is there some framework which performs automatic validation of function arguments using the schema property? Googling this didn't bring up anything.