Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
tonic + npm: jojen
node v4.9.1
endpoint
share
tweet
'use strict'; const fs = require('rtkapi') const Jo = require('jojen'); const schema = Jo.alternatives().try([ Jo.object().keys({ channel: Jo.required(), }).unknown().required(), Jo.object().keys({ channelId: Jo.number().integer().required(), }).unknown().required(), ]) let obj = { channel: true }; Jo.validateSync(obj, schema);
Created from: https://tonicdev.com/npm/jojen
Loading…
no comments
sign in
to comment