@prismicio/types-internal
Advanced tools
Comparing version 2.0.0-alpha.6 to 2.0.0-alpha.7
@@ -15,4 +15,4 @@ "use strict"; | ||
function hasContentType(obj) { | ||
return typeof obj.__TYPE__ === "string"; | ||
return typeof obj === "object" && obj !== null && "__TYPE__" in obj; | ||
} | ||
exports.hasContentType = hasContentType; |
{ | ||
"name": "@prismicio/types-internal", | ||
"version": "2.0.0-alpha.6", | ||
"version": "2.0.0-alpha.7", | ||
"description": "Prismic types for Custom Types and Prismic Data", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -18,3 +18,3 @@ import { isRight } from "fp-ts/lib/Either" | ||
export function hasContentType(obj: unknown): obj is WithContentType { | ||
return typeof (obj as WithContentType).__TYPE__ === "string" | ||
return typeof obj === "object" && obj !== null && "__TYPE__" in obj | ||
} |
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
2054495