New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

suretype

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

suretype - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

26

dist/validation-error.js

@@ -16,11 +16,19 @@ import { getPrettify } from "./ajv-errors.js";

function makeExplanation(errors, { schema, data, colors = getSuretypeOptions().colors, location = getSuretypeOptions().location, bigNumbers = getSuretypeOptions().bigNumbers, noFallback = false }) {
if (schema && typeof schema === 'object')
return getPrettify()({
errors,
schema,
data,
colors,
location,
bigNumbers,
});
var _a;
if (schema && typeof schema === 'object') {
try {
return getPrettify()({
errors,
schema,
data,
colors,
location,
bigNumbers,
});
}
catch (err) {
console.error(err === null || err === void 0 ? void 0 : err.stack);
return (_a = err.message) !== null && _a !== void 0 ? _a : 'Unknown error';
}
}
else if (!noFallback)

@@ -27,0 +35,0 @@ return JSON.stringify(errors, null, 2);

{
"name": "suretype",
"version": "3.0.2",
"version": "3.0.3",
"description": "Typesafe JSON (Schema) validator with magic powers 🧙‍♂️",

@@ -62,3 +62,3 @@ "author": "Gustaf Räntilä",

"ajv": "^6.11.0",
"awesome-ajv-errors": "^4.1.0",
"awesome-ajv-errors": "^4.1.1",
"meta-types": "^1.1.1"

@@ -65,0 +65,0 @@ },

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