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

@badrap/valita

Package Overview
Dependencies
Maintainers
2
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@badrap/valita - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

20

dist/main/index.js

@@ -112,2 +112,22 @@ "use strict";

}
else if (issue.code === "invalid_length") {
var min = issue.minLength;
var max = issue.maxLength;
message = "expected an array with ";
if (min > 0) {
if (max === min) {
message += "" + min;
}
else if (max < Infinity) {
message += "between " + min + " and " + max;
}
else {
message += "at least " + min;
}
}
else {
message += "at most " + max;
}
message += " item(s)";
}
else if (issue.code === "custom_error") {

@@ -114,0 +134,0 @@ var error = issue.error;

@@ -78,2 +78,22 @@ "use strict";

}
else if (issue.code === "invalid_length") {
const min = issue.minLength;
const max = issue.maxLength;
message = `expected an array with `;
if (min > 0) {
if (max === min) {
message += `${min}`;
}
else if (max < Infinity) {
message += `between ${min} and ${max}`;
}
else {
message += `at least ${min}`;
}
}
else {
message += `at most ${max}`;
}
message += ` item(s)`;
}
else if (issue.code === "custom_error") {

@@ -80,0 +100,0 @@ const error = issue.error;

2

package.json
{
"name": "@badrap/valita",
"version": "0.0.10",
"version": "0.0.11",
"description": "A validation & parsing library for TypeScript",

@@ -5,0 +5,0 @@ "main": "./dist/main/index.js",

@@ -122,2 +122,18 @@ // This is magic that turns object intersections to nicer-looking types.

message = `unrecognized key ${formatLiteral(issue.key)}`;
} else if (issue.code === "invalid_length") {
const min = issue.minLength;
const max = issue.maxLength;
message = `expected an array with `;
if (min > 0) {
if (max === min) {
message += `${min}`;
} else if (max < Infinity) {
message += `between ${min} and ${max}`;
} else {
message += `at least ${min}`;
}
} else {
message += `at most ${max}`;
}
message += ` item(s)`;
} else if (issue.code === "custom_error") {

@@ -124,0 +140,0 @@ const error = issue.error;

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