@sinclair/typebox 0.32.29 → 0.32.30

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.
@@ -20,7 +20,7 @@ exports.IsIterator = IsIterator;
20
20
  // --------------------------------------------------------------------------
21
21
  /** Returns true if this value is not an instance of a class */
22
22
  function IsStandardObject(value) {
23
- return IsObject(value) && !IsArray(value) && IsFunction(value.constructor) && value.constructor.name === 'Object';
23
+ return IsObject(value) && (Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null);
24
24
  }
25
25
  exports.IsStandardObject = IsStandardObject;
26
26
  /** Returns true if this value is an instance of a class */
@@ -14,7 +14,7 @@ export function IsIterator(value) {
14
14
  // --------------------------------------------------------------------------
15
15
  /** Returns true if this value is not an instance of a class */
16
16
  export function IsStandardObject(value) {
17
- return IsObject(value) && !IsArray(value) && IsFunction(value.constructor) && value.constructor.name === 'Object';
17
+ return IsObject(value) && (Object.getPrototypeOf(value) === Object.prototype || Object.getPrototypeOf(value) === null);
18
18
  }
19
19
  /** Returns true if this value is an instance of a class */
20
20
  export function IsInstanceObject(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinclair/typebox",
3
- "version": "0.32.29",
3
+ "version": "0.32.30",
4
4
  "description": "Json Schema Type Builder with Static Type Resolution for TypeScript",
5
5
  "keywords": [
6
6
  "typescript",