Skip to content
On this page

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

SourceDocs

Contributors

Curt Grimes
Anthony Fu

Changelog

v8.9.1 on 7/8/2022
1a4e0 - feat(math)!: move logicAnd, logicOr, logicNot to @vueuse/math (#1794)
a9ccc - feat(all): use MaybeComputedRef (#1768)

Released under the MIT License.