🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@sinclair/typebox

Package Overview
Dependencies
Maintainers
1
Versions
406
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sinclair/typebox - npm Package Compare versions

Comparing version
0.28.21
to
0.28.22
+3
-1
compiler/compiler.js

@@ -345,3 +345,3 @@ "use strict";

const [patternKey, patternSchema] = globalThis.Object.entries(schema.patternProperties)[0];
const local = PushLocal(`new RegExp(/${patternKey}/)`);
const local = PushLocal(`${new RegExp(patternKey)}`);
const check1 = CreateExpression(patternSchema, references, 'value');

@@ -394,2 +394,4 @@ const check2 = Types.TypeGuard.TSchema(schema.additionalProperties) ? CreateExpression(schema.additionalProperties, references, value) : schema.additionalProperties === false ? 'false' : 'true';

return yield `${value}.length === 0`;
if (!IsNumber(schema.maxItems))
throw Error('MaxItems: Not a Number');
yield `(${value}.length === ${schema.maxItems})`;

@@ -396,0 +398,0 @@ for (let i = 0; i < schema.items.length; i++) {

{
"name": "@sinclair/typebox",
"version": "0.28.21",
"version": "0.28.22",
"description": "JSONSchema Type Builder with Static Type Resolution for TypeScript",

@@ -5,0 +5,0 @@ "keywords": [