Back to Vueuse

logicOr

packages/math/logicOr/index.md

14.3.0256 B
Original Source

logicOr

OR conditions for refs.

Usage

ts
import { whenever } from '@vueuse/core'
import { logicOr } from '@vueuse/math'

const a = ref(true)
const b = ref(false)

whenever(logicOr(a, b), () => {
  console.log('either a or b is truthy!')
})