Skip to content
This repository was archived by the owner on Feb 16, 2021. It is now read-only.

v2.2.0

Choose a tag to compare

@gcanti gcanti released this 12 Aug 16:06
· 269 commits to master since this release
  • New Feature
    • added intersection combinator fix #111

      Example

      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