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.23 to 3.2.24

5

CHANGELOG.md

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

# v3.2.24
- **Bug Fix**
- Struct extension of a refinement of a struct now use the correct displayName, fix #297 (@gcanti)
# v3.2.23

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

16

lib/extend.js

@@ -11,6 +11,11 @@ var assert = require('./assert');

function compose(predicates, unrefinedType) {
return predicates.reduce(function (type, predicate) {
function compose(predicates, unrefinedType, name) {
var result = predicates.reduce(function (type, predicate) {
return refinement(type, predicate);
}, unrefinedType);
if (name) {
result.displayName = name;
result.meta.name = name;
}
return result;
}

@@ -52,3 +57,6 @@

options.defaultProps = mixin(defaultProps, options.defaultProps, true);
var result = compose(predicates, combinator(props, options));
var result = compose(predicates, combinator(props, {
strict: options.strict,
defaultProps: options.defaultProps
}), options.name);
mixin(result.prototype, prototype);

@@ -58,2 +66,2 @@ return result;

module.exports = extend;
module.exports = extend;
{
"name": "tcomb",
"version": "3.2.23",
"version": "3.2.24",
"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