Socket
Socket
Sign inDemoInstall

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 Compare versions

Comparing version 3.2.10 to 3.2.11

5

CHANGELOG.md

@@ -15,2 +15,7 @@ # Changelog

# 3.2.11
- **Bug Fix**
- allow declare'd unions with custom dispatch, fix #242 (@gcanti)
# 3.2.10

@@ -17,0 +22,0 @@

@@ -7,2 +7,3 @@ var assert = require('./assert');

var getTypeName = require('./getTypeName');
var isUnion = require('./isUnion');

@@ -23,2 +24,5 @@ // All the .declare-d types should be clearly different from each other thus they should have

assert(!isNil(type), function () { return 'Type declared but not defined, don\'t forget to call .define on every declared type'; });
if (isUnion(type)) {
assert(type.dispatch === Declare.dispatch, function () { return 'Please define the custom ' + name + '.dispatch function before calling ' + name + '.define()'; });
}
}

@@ -35,2 +39,5 @@ return type(value, path);

if (isUnion(spec) && Declare.hasOwnProperty('dispatch')) {
spec.dispatch = Declare.dispatch;
}
type = spec;

@@ -37,0 +44,0 @@ mixin(Declare, type, true); // true because it overwrites Declare.displayName

2

package.json
{
"name": "tcomb",
"version": "3.2.10",
"version": "3.2.11",
"description": "Type checking and DDD for JavaScript",

@@ -5,0 +5,0 @@ "main": "index.js",

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