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

@typeschema/class-validator

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typeschema/class-validator - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

14

dist/index.js

@@ -55,2 +55,11 @@ "use strict";

});
function getIssues(error, parentPath) {
const path = [
...parentPath,
Number.isInteger(+error.property) ? +error.property : error.property
];
return Object.values(error.constraints ?? {}).map((message) => ({ message, path })).concat(
error.children?.flatMap((childError) => getIssues(childError, path)) ?? []
);
}
var validationAdapter = async (schema) => {

@@ -68,6 +77,3 @@ const { validate: validate2 } = await importValidationModule();

return {
issues: errors.map((error) => ({
message: error.toString(),
path: [error.property]
})),
issues: errors.flatMap((error) => getIssues(error, [])),
success: false

@@ -74,0 +80,0 @@ };

@@ -5,3 +5,3 @@ {

"//version": "This field is manually maintained.",
"version": "0.2.0",
"version": "0.3.0",
"//description": "This field is manually maintained.",

@@ -8,0 +8,0 @@ "description": "Reusable adapter for class-validator classes",

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