assistan-ts
Version:
A typesafe and code-first library to define and run OpenAI assistants
14 lines • 493 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isNullType = void 0;
const typebox_1 = require("@sinclair/typebox");
const NULL_TYPES_KINDS = [
typebox_1.Type.Void()[typebox_1.Kind],
typebox_1.Type.Undefined()[typebox_1.Kind],
typebox_1.Type.Null()[typebox_1.Kind],
];
const isNullType = (obj) => {
return obj == null || NULL_TYPES_KINDS.includes(obj[typebox_1.Kind]);
};
exports.isNullType = isNullType;
//# sourceMappingURL=typebox.js.map