babel-generate-guard-clauses
Advanced tools
Comparing version 1.0.0 to 2.0.0
@@ -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", |
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
10792
112