#joi-fp
Provides a few wrappers around Joi's validate()
, attempt()
and assert()
functions with their arguments
re-ordered for easier currying / partial application

Installation:
npm i joi-fp
Quick Example
const _ = require('lodash')
const joi = require('joi-fp')(require('joi'))
const validateInput = _.curry(joi.validateFp3)({
name: joi.string().required()
})({allowUnknown: true});
validateInput({name: 'Max', color: 'blue'})
const validateInputAgain = _.partial(joi.validateFp, {
name: joi.string().required()
}, {allowUnknown: true});
validateInputAgain({name: 'Max', color: 'blue'}, (err, value) => {
console.log(err, value)
})
Functions
validateFp2 (schema, value)
validateFp3 (schema, optsOrValue, optsOrCb)
validateFp (schema, options, value, callback)
attemptFp2 (schema, value)
attemptFp (schema, message, value)
assertFp2 (schema, message, value)
assertFp (schema, message, value)