UNPKG

guardz

Version:

A simple and lightweight TypeScript type guard library for runtime type validation.

15 lines (14 loc) 396 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isIntersectionOf = isIntersectionOf; // Implementation function isIntersectionOf(...typeGuards) { return function (value, config) { for (const typeGuard of typeGuards) { if (!typeGuard(value, config)) { return false; } } return true; }; }