@frauschert/ts-guard
Version:
ts-guard is a typescript library that provides composable type guards. Its inspired by zod but focusses only on type guards and is more lightweight.
9 lines • 390 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isObject = void 0;
const isNull_1 = require("../isNull/isNull");
const isObject = (propertyGuards) => (x) => typeof x == "object" &&
!(0, isNull_1.isNull)(x) &&
Object.entries(propertyGuards).every(([key, value]) => value(x[key]));
exports.isObject = isObject;
//# sourceMappingURL=isObject.js.map