Skip to content

Instantly share code, notes, and snippets.

@magna25
magna25 / jebena.js
Created July 3, 2020 23:51
Validate incoming request data with jebena
import {jebenaExpress isEmail, minLength} from 'jebena'
const spec = {
username: isEmail(),
password: minLength(5)
}
app.post("/users", jebenaExpress(spec), (req, res) => {
//req.body is validated
})