Skip to content
On this page

logicOr

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

Category
Export Size
201 B
Package
@vueuse/math
Last Changed
9 months ago
Alias
or
Related

SourceDocs

贡献者(Contributors)

日志(Changelog)

No recent changes

Released under the MIT License.