@sinclair/typebox
Advanced tools
@@ -342,3 +342,3 @@ "use strict"; | ||
| const [keyPattern, valueSchema] = globalThis.Object.entries(schema.patternProperties)[0]; | ||
| const local = PushLocal(`new RegExp(/${keyPattern}/)`); | ||
| const local = PushLocal(`${new RegExp(keyPattern)}`); | ||
| yield `(Object.getOwnPropertyNames(${value}).every(key => ${local}.test(key)))`; | ||
@@ -390,2 +390,4 @@ const expression = CreateExpression(valueSchema, references, 'value'); | ||
| return yield `${value}.length === 0`; | ||
| if (!IsNumber(schema.maxItems)) | ||
| throw Error('MaxItems: Not a Number'); | ||
| yield `(${value}.length === ${schema.maxItems})`; | ||
@@ -392,0 +394,0 @@ for (let i = 0; i < schema.items.length; i++) { |
+1
-1
| { | ||
| "name": "@sinclair/typebox", | ||
| "version": "0.27.11", | ||
| "version": "0.27.12", | ||
| "description": "JSONSchema Type Builder with Static Type Resolution for TypeScript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
440349
0.02%7341
0.03%