Comparing version 0.0.13 to 0.0.14
@@ -10,3 +10,2 @@ "use strict"; | ||
const to_pascal_case_js_1 = require("./to-pascal-case.js"); | ||
const types_1 = require("node:util/types"); | ||
const IS_ZOD_CLASS = Symbol.for("zod-class"); | ||
@@ -114,3 +113,3 @@ exports.Z = { | ||
const result = this._schema._parse(input); | ||
if ((0, types_1.isPromise)(result)) { | ||
if (isPromise(result)) { | ||
return result.then((result) => _coerceParseResult(this, result)); | ||
@@ -179,2 +178,5 @@ } | ||
} | ||
function isPromise(obj) { | ||
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; | ||
} | ||
//# sourceMappingURL=index.js.map |
@@ -7,3 +7,2 @@ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) { | ||
import { toPascalCase } from "./to-pascal-case.js"; | ||
import { isPromise } from "node:util/types"; | ||
const IS_ZOD_CLASS = Symbol.for("zod-class"); | ||
@@ -175,2 +174,5 @@ export const Z = { | ||
} | ||
function isPromise(obj) { | ||
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "zod-class", | ||
"description": "Create classes from Zod Object schemas all in one line", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "url": "https://github.com/sam-goodwin/zod-class" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
177652
499