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

babel-generate-guard-clauses

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-generate-guard-clauses - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

4

index.js

@@ -106,6 +106,8 @@ const t = require("babel-types");

// throw new Error(matcher + 'should be an instance of + 'Matcher' + ', but got ' + matcher);
// return;
// }
const instanceOfCheck = template(`
if (!(ARG_NAME.constructor.name === INSTANCE_NAME)) {
return new Error(ARG_NAME + ' should be an instance of ' + INSTANCE_NAME + ', but got ' + ARG_NAME);
throw new Error(ARG_NAME + ' should be an instance of ' + INSTANCE_NAME + ', but got ' + ARG_NAME);
return;
}

@@ -112,0 +114,0 @@ `)

{
"name": "babel-generate-guard-clauses",
"version": "1.0.0",
"version": "2.0.0",
"description": "A helper to generate different guard clauses",

@@ -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