fake-joi

Create a Joi schema as string

Usage no npm install needed!

<script type="module">
  import fakeJoi from 'https://cdn.skypack.dev/fake-joi';
</script>

README

fake-joi

Create a Joi schema as string

Usage

const Joi = require('fake-joi')
const schema = Joi.object({
  someKey: Joi.number().integer().required()
})

console.log(schema._) // returns schema as string
// Joi.object({"someKey": Joi.number().integer().required()})