contractis
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -101,3 +101,5 @@ const gen = require("./generators"); | ||
if (typeof x !== "object") | ||
return `Expected object with fields ${o}, got type ${typeof x}`; | ||
return `Expected object with fields ${JSON.stringify( | ||
o | ||
)}, got type ${typeof x}`; | ||
const failing = Object.entries(o || {}).find(([k, v]) => !v.check(x[k])); | ||
@@ -116,2 +118,3 @@ if (failing) { | ||
typeof x === "object" && | ||
!(x.constructor && x.constructor.name === Promise.name) && | ||
(typeof alsoCheckThat === "undefined" || alsoCheckThat(x)) && | ||
@@ -118,0 +121,0 @@ Object.entries(o || {}).every(([k, v]) => v.check(x[k])), |
{ | ||
"name": "contractis", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "Design by Contract for JavaScript", | ||
@@ -21,3 +21,3 @@ "repository": "github:saltcorn/saltcorn", | ||
}, | ||
"gitHead": "d4a0f3070191b628424af5325c229a0c82681de7" | ||
"gitHead": "2a088e28b3df98fb79b91d891ae0c2bff9811300" | ||
} |
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
31703
1103