Comparing version 3.2.3 to 3.2.4
@@ -15,2 +15,7 @@ # Changelog | ||
# v3.2.4 | ||
- **Polish** | ||
- decouple usage of new operator in create() function, fix #223 (@gcanti) | ||
# v3.2.3 | ||
@@ -17,0 +22,0 @@ |
@@ -9,4 +9,3 @@ var isType = require('./isType'); | ||
if (isType(type)) { | ||
// for structs the new operator is allowed | ||
return type.meta.kind === 'struct' ? new type(value, path) : type(value, path); | ||
return type.meta.identity ? type(value, path): new type(value, path); | ||
} | ||
@@ -13,0 +12,0 @@ |
@@ -5,3 +5,2 @@ var assert = require('./assert'); | ||
var isMaybe = require('./isMaybe'); | ||
var isIdentity = require('./isIdentity'); | ||
var Any = require('./Any'); | ||
@@ -42,3 +41,3 @@ var create = require('./create'); | ||
name: name, | ||
identity: isIdentity(type) | ||
identity: true | ||
}; | ||
@@ -45,0 +44,0 @@ |
{ | ||
"name": "tcomb", | ||
"version": "3.2.3", | ||
"version": "3.2.4", | ||
"description": "Type checking and DDD for JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87127
1904