Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tcomb

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tcomb - npm Package Versions

1
8

2.2.1

Diff

Changelog

Source

v2.2.1

  • Experimental
    • pattern matching #121
gcanti
published 2.2.0 •

Changelog

Source

v2.2.0

  • 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
gcanti
published 1.1.0 •

gcanti
published 2.1.0 •

Changelog

Source

v2.1.0

  • New Feature
    • added aliases for pre-defined irreducible types fix #112
    • added overridable stringify function to handle error messages and improve performances in development (replaces the experimental options.verbose)
gcanti
published 2.0.1 •

Changelog

Source

v2.0.1

  • Experimental
    • added options.verbose (default true) to handle messages (set options.verbose = false to improve performances in development)
gcanti
published 2.0.0 •

Changelog

Source

v2.0.0

  • New Feature
    • add support to types defined as ES6 classes #99
    • optimized for production code: asserts and freeze only in development mode
    • add is(x, type) function
    • add isType(x) function
    • add stringify(x) function
  • Breaking change
    • numeric types on enums #93 (thanks @m0x72)
    • remove asserts when process.env.NODE_ENV === 'production' #100
    • do not freeze if process.env.NODE_ENV === 'production' #103
    • func without currying #96 (thanks @tmcw)
    • remove useless exports #104
    • drop bower support #101
    • remove useless exports
      • Type
      • slice
      • shallowCopy
      • getFunctionName
gcanti
published 2.0.0-beta •

gcanti
published 1.0.3 •

gcanti
published 1.0.2 •

gcanti
published 1.0.1 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc