trainingproject
Version:
A module to teach you how to module.
19 lines (16 loc) • 367 B
JavaScript
var Joi = require('joi')
var PluginNoName = Joi.object({
validate: Joi.func().required(),
augment: Joi.func(),
attach: Joi.func()
})
var Plugin = PluginNoName.keys({
name: Joi.string().required()
})
module.exports = Joi.object({
plugins: Joi.alternatives().try(
Joi.array().items(Plugin, Joi.string()),
Plugin
).default([])
}).strict()