Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Joi = require('joi');
const Felicity = require('felicity');
const schema = Joi.object().keys({
name : Joi.string(),
age : Joi.number().integer(),
cyborgMods: Joi.number(),
occupation: Joi.object().keys({
title: Joi.string(),
level: Joi.string()
}),
active : Joi.boolean(),
affiliations: Joi.array().items(Joi.string())
});
module.exports = Felicity.entityFor(schema);