v2.1.0
Features
-
Add Schema Composition utilities (#2): 04b22b5, c2a7394
t.one(t.string(), t.number()); //-> { //-> oneOf: [ //-> { type: 'string' }, //-> { type: 'number' }, //-> ] //-> } t.any(t.string(), t.number()); //-> { //-> anyOf: [ //-> { type: 'string' }, //-> { type: 'number' }, //-> ] //-> } t.all( t.string({ minLength: 2 }), t.string({ maxLength: 40 }), ); //-> { //-> allOf: [ //-> { type: 'string', minLength: 2 }, //-> { type: 'string', maxLength: 40 }, //-> ] //-> } t.not(t.string()) //-> { //-> not: { //-> type: 'string' //-> } //->}
Chores
Full Changelog: v2.0.1...v2.1.0