UNPKG

@cran/lib.vue.ref

Version:

Vue Reactivity Extensions

13 lines (12 loc) 288 B
import { eagerComputed, unwrap } from "../utility"; /** * @since 0.0.1 * @category Operator */ export function useXor(x, y) { return eagerComputed(function compute() { const ux = unwrap(x); const uy = unwrap(y); return (!uy && ux) || (!ux && uy); }); }