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

intertype

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intertype - npm Package Compare versions

Comparing version 0.101.5 to 0.101.6

7

lib/declarations.js

@@ -138,2 +138,9 @@ (function() {

//.........................................................................................................
declare.nan({
isa: function(x) {
return Number.isNaN(x);
},
default: 0/0
});
//.........................................................................................................
declare.negatable({ // numeric? numeral?

@@ -140,0 +147,0 @@ isa: function(x) {

9

lib/main.js

@@ -193,3 +193,3 @@ (function() {

convention for this method. */
var dsc;
var dsc, dscv;
dsc = this.type_factory.create_type(...P);

@@ -199,3 +199,6 @@ this.registry[dsc.typename] = dsc;

this.isa[dsc.typename] = new Proxy(dsc, this._get_hedge_sub_proxy_cfg(this));
this.validate[dsc.typename] = new Proxy(dsc, this._get_hedge_sub_proxy_cfg(this));
dscv = (x) => {
return this._validate(dsc.typename, x);
};
this.validate[dsc.typename] = new Proxy(dscv, this._get_hedge_sub_proxy_cfg(this));
if (dsc.collection) {

@@ -313,3 +316,3 @@ this._collections.add(dsc.typename);

//.....................................................................................................
throw new E.Intertype_internal_error('^intertype.isa@9^', `unexpected return value from hedgemethod for hedge ${rpr(hedge)}: ${rpr(R)}`);
throw new E.Intertype_internal_error('^intertype.isa@9^', `unexpected return value from hedgemethod for hedge ${rpr(hedge)}: ${rpr(result)}`);
}

@@ -316,0 +319,0 @@ //.......................................................................................................

@@ -141,10 +141,7 @@ (function() {

this.hub.push_hedgeresult(['▲nt2', this.hub.state.isa_depth, dsc.name, x, R]);
if ((this.hub.state.verb === 'validate') && (this.hub.state.hedges.length === 1)) {
return x;
} else {
return R;
}
return R;
};
})());
}
// return if ( @hub.state.verb is 'validate' ) and ( @hub.state.hedges.length is 1 ) then x else R
//.......................................................................................................

@@ -151,0 +148,0 @@ dsc = {...H.defaults.Type_factory_type_dsc, ...dsc};

{
"name": "intertype",
"version": "0.101.5",
"version": "0.101.6",
"description": "A JavaScript typechecker",

@@ -5,0 +5,0 @@ "main": "lib/main.js",

@@ -612,2 +612,4 @@

* **[–]** make sure key properties of `Intertype` instances are hidden to avoid terminal flooding on output
* **[–]** implement a way for type tests to communicate a reason for rejection of a value; this should be
picked up by `validate` when throwing error

@@ -614,0 +616,0 @@ ## Is Done

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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