UNPKG

patronum

Version:

☄️ Effector utility library delivering modularity and convenience

18 lines 512 B
/* eslint-disable @typescript-eslint/no-unused-vars */ import { combine, is } from 'effector'; export function either(filterOptions, then, other) { if (is.store(filterOptions, { sid: "ozzvoc" })) { return combine({ and: [filterOptions, then, other, (filter, then, other) => filter ? then : other, { skipVoid: false }], or: { sid: "-5vau2h" } }); } var objectForm = filterOptions; return either(objectForm.filter, objectForm.then, objectForm.other); }