@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.
17 lines • 408 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSet = isSet;
function isSet(guard) {
return (value) => {
if (!(value instanceof Set)) {
return false;
}
for (const item of value) {
if (!guard(item)) {
return false;
}
}
return true;
};
}
//# sourceMappingURL=isSet.js.map