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 10.1.2 to 10.1.3

7

lib/helpers.js

@@ -353,5 +353,4 @@ (function() {

},
"x.errors in [ false, 'throw', ]": function(x) {
var ref1;
return (ref1 = x.errors) === false || ref1 === 'throw';
"@isa.boolean x.errors": function(x) {
return this.isa.boolean(x.errors);
}

@@ -364,3 +363,3 @@ }

sep: '.',
errors: false
errors: true
};

@@ -367,0 +366,0 @@

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

error = error1;
if (this.cfg.errors === 'throw' || error instanceof E.Intertype_error) {
if (this.cfg.errors || error instanceof E.Intertype_error) {
throw error;

@@ -228,0 +228,0 @@ }

{
"name": "intertype",
"version": "10.1.2",
"version": "10.1.3",
"description": "A JavaScript typechecker",

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

@@ -58,3 +58,3 @@

Intertype_user_error } = require 'intertype'
types = new Intertype
types = new Intertype { errors: false, }
types.declare.nevah ( x ) -> false

@@ -70,6 +70,5 @@ types.declare.oops ( x ) -> throw new Error 'oops'

Because silently suppressed errors
can be tricky to debug and checking for `state.error` is easily forgotten (and should not normally be
necessary), users may elect to switch off exception-guarding by setting `errors` to `'throw'` (as in,
`types = new Intertype { errors: 'throw', }`)
Because silently suppressed errors can be tricky to debug and checking for `state.error` is easily
forgotten (and should not normally be necessary), exception-guarding is an opt-in (as shown above, use
`errors: false`)
* Users may always construct type testers whose intentional errors will not be silently caught by deriving

@@ -76,0 +75,0 @@ their errors from `Intertype_user_error`

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