@sinclair/typebox
Advanced tools
Comparing version 0.16.4 to 0.16.5
{ | ||
"name": "@sinclair/typebox", | ||
"version": "0.16.4", | ||
"version": "0.16.5", | ||
"description": "JSONSchema Type Builder with Static Type Resolution for TypeScript", | ||
@@ -26,9 +26,9 @@ "keywords": [ | ||
"devDependencies": { | ||
"@types/chai": "^4.1.3", | ||
"@types/mocha": "^5.2.0", | ||
"@types/node": "^13.7.7", | ||
"ajv": "^7.1.1", | ||
"ajv-formats": "^1.5.1", | ||
"chai": "^4.1.2", | ||
"mocha": "^7.1.1", | ||
"@types/chai": "^4.2.16", | ||
"@types/mocha": "^8.2.2", | ||
"@types/node": "^14.14.37", | ||
"ajv": "^8.1.0", | ||
"ajv-formats": "^2.0.2", | ||
"chai": "^4.3.4", | ||
"mocha": "^8.3.2", | ||
"smoke-run": "^1.1.2", | ||
@@ -35,0 +35,0 @@ "smoke-task": "^1.1.2", |
@@ -201,3 +201,3 @@ "use strict"; | ||
Required(schema, options = {}) { | ||
const next = { ...options, ...clone(schema) }; | ||
const next = { ...clone(schema), ...options }; | ||
next.required = Object.keys(next.properties); | ||
@@ -225,3 +225,3 @@ for (const key of Object.keys(next.properties)) { | ||
Partial(schema, options = {}) { | ||
const next = { ...options, ...clone(schema) }; | ||
const next = { ...clone(schema), ...options }; | ||
delete next.required; | ||
@@ -249,3 +249,3 @@ for (const key of Object.keys(next.properties)) { | ||
Pick(schema, keys, options = {}) { | ||
const next = { ...options, ...clone(schema) }; | ||
const next = { ...clone(schema), ...options }; | ||
next.required = next.required ? next.required.filter((key) => keys.includes(key)) : undefined; | ||
@@ -260,3 +260,3 @@ for (const key of Object.keys(next.properties)) { | ||
Omit(schema, keys, options = {}) { | ||
const next = { ...options, ...clone(schema) }; | ||
const next = { ...clone(schema), ...options }; | ||
next.required = next.required ? next.required.filter((key) => !keys.includes(key)) : undefined; | ||
@@ -263,0 +263,0 @@ for (const key of Object.keys(next.properties)) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87529
6