@sinclair/typebox 0.24.19 → 0.24.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/readme.md +4 -4
- package/value/check.js +1 -1
- package/value/errors.js +1 -1
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sinclair/typebox",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.20",
|
|
4
4
|
"description": "JSONSchema Type Builder with Static Type Resolution for TypeScript",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"json-schema",
|
|
7
6
|
"typescript",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
7
|
+
"json-schema",
|
|
8
|
+
"validate",
|
|
9
|
+
"typecheck"
|
|
10
10
|
],
|
|
11
11
|
"author": "sinclairzx81",
|
|
12
12
|
"license": "MIT",
|
package/readme.md
CHANGED
|
@@ -114,9 +114,9 @@ const T = Type.Object({ // const T = {
|
|
|
114
114
|
// }
|
|
115
115
|
// },
|
|
116
116
|
// required: [
|
|
117
|
-
//
|
|
118
|
-
//
|
|
119
|
-
//
|
|
117
|
+
// 'id',
|
|
118
|
+
// 'name',
|
|
119
|
+
// 'timestamp'
|
|
120
120
|
// ]
|
|
121
121
|
// }
|
|
122
122
|
|
|
@@ -876,7 +876,7 @@ console.log(C.Code()) // return function check(va
|
|
|
876
876
|
|
|
877
877
|
## Benchmark
|
|
878
878
|
|
|
879
|
-
This project maintains benchmarks that measure Ajv and TypeCompiler
|
|
879
|
+
This project maintains benchmarks that measure Ajv and TypeCompiler validate and compile performance. These benchmarks can be run locally by cloning this repository and running `npm run benchmark`. Results show against Ajv version 8.11.0.
|
|
880
880
|
|
|
881
881
|
### Validate
|
|
882
882
|
|
package/value/check.js
CHANGED
|
@@ -201,7 +201,7 @@ var ValueCheck;
|
|
|
201
201
|
return true;
|
|
202
202
|
}
|
|
203
203
|
function Tuple(schema, references, value) {
|
|
204
|
-
if (!
|
|
204
|
+
if (!globalThis.Array.isArray(value)) {
|
|
205
205
|
return false;
|
|
206
206
|
}
|
|
207
207
|
if (schema.items === undefined && !(value.length === 0)) {
|
package/value/errors.js
CHANGED
|
@@ -195,7 +195,7 @@ var ValueErrors;
|
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
function* Tuple(schema, references, path, value) {
|
|
198
|
-
if (!
|
|
198
|
+
if (!globalThis.Array.isArray(value)) {
|
|
199
199
|
return yield { schema, path, value, message: 'Expected Array' };
|
|
200
200
|
}
|
|
201
201
|
if (schema.items === undefined && !(value.length === 0)) {
|