logicOr
Category
Export Size
201 B
Package
@vueuse/math
Last Changed
6 months ago
Alias
or
Related
OR
conditions for refs.
Usage
ts
import { logicOr } from '@vueuse/math'
import { whenever } from '@vueuse/core'
const a = ref(true)
const b = ref(false)
whenever(logicOr(a, b), () => {
console.log('either a or b is truthy!')
})
import { logicOr } from '@vueuse/math'
import { whenever } from '@vueuse/core'
const a = ref(true)
const b = ref(false)
whenever(logicOr(a, b), () => {
console.log('either a or b is truthy!')
})
Type Declarations
typescript
/**
* `OR` conditions for refs.
*
* @see https://vueuse.org/logicOr
*/
export declare function logicOr(
...args: MaybeComputedRef<any>[]
): ComputedRef<boolean>
export { logicOr as or }
/**
* `OR` conditions for refs.
*
* @see https://vueuse.org/logicOr
*/
export declare function logicOr(
...args: MaybeComputedRef<any>[]
): ComputedRef<boolean>
export { logicOr as or }
Source
Contributors
Curt Grimes
Anthony Fu