unschema
v0.2.1
Published
Generates example JSON from JSON Schema
Downloads
3
Readme
unschema
Generate JSON from JSON Schema
Usage
const unschema = require('unschema');
console.log(unschema({ type: 'string' })); // 'ABCDEFGHIJ'
console.log(unschema({ type: 'number' })); // 0
console.log(unschema({ type: 'boolean' })); // true
console.log(unschema({
type: 'object',
properties: {
a: { type: 'string' },
b: { type: 'number' }
}
});
// => { a: 'ABCDEFGHIJ', b: 0 }