@sinclair/typebox
Advanced tools
Comparing version 0.16.0 to 0.16.1
{ | ||
"name": "@sinclair/typebox", | ||
"version": "0.16.0", | ||
"version": "0.16.1", | ||
"description": "JSONSchema Type Builder with Static Type Resolution for TypeScript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -204,10 +204,10 @@ <div align='center'> | ||
│ }) │ } │ properties: { │ | ||
│ │ │ a: { │ | ||
│ │ │ x: { │ | ||
│ │ │ type: 'number' │ | ||
│ │ │ }, │ | ||
│ │ │ b: { │ | ||
│ │ │ y: { │ | ||
│ │ │ type: 'number' │ | ||
│ │ │ } │ | ||
│ │ │ }, │ | ||
│ │ │ required: ['a', 'b'] │ | ||
│ │ │ required: ['x', 'y'] │ | ||
│ │ │ } │ | ||
@@ -214,0 +214,0 @@ │ │ │ │ |
@@ -67,3 +67,3 @@ "use strict"; | ||
function clone(object) { | ||
if (typeof object === 'object' && !Array.isArray(object)) { | ||
if (typeof object === 'object' && object !== null && !Array.isArray(object)) { | ||
return Object.keys(object).reduce((acc, key) => { | ||
@@ -74,3 +74,3 @@ acc[key] = clone(object[key]); | ||
} | ||
else if (typeof object === 'object' && Array.isArray(object)) { | ||
else if (typeof object === 'object' && object !== null && Array.isArray(object)) { | ||
return object.map((item) => clone(item)); | ||
@@ -77,0 +77,0 @@ } |
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
75699