This repository was archived by the owner on Feb 16, 2021. It is now read-only.
v2.2.0
- New Feature
-
added
intersectioncombinator fix #111Example
const Min = t.subtype(t.String, function (s) { return s.length > 2; }, 'Min'); const Max = t.subtype(t.String, function (s) { return s.length < 5; }, 'Max'); const MinMax = t.intersection([Min, Max], 'MinMax'); MinMax.is('abc'); // => true MinMax.is('a'); // => false MinMax.is('abcde'); // => false
-
- Internal
- optimised the generation of default names for types