Skip to content
On this page

logicAnd

AND condition for refs.

Usage

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

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

whenever(logicAnd(a, b), () => {
  console.log('both a and b are now truthy!')
})
import { logicAnd } from '@vueuse/math'
import { whenever } from '@vueuse/core'

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

whenever(logicAnd(a, b), () => {
  console.log('both a and b are now truthy!')
})

Type Declarations

typescript
/**
 * `AND` conditions for refs.
 *
 * @see https://vueuse.org/logicAnd
 */
export declare function logicAnd(
  ...args: MaybeComputedRef<any>[]
): ComputedRef<boolean>
export { logicAnd as and }
/**
 * `AND` conditions for refs.
 *
 * @see https://vueuse.org/logicAnd
 */
export declare function logicAnd(
  ...args: MaybeComputedRef<any>[]
): ComputedRef<boolean>
export { logicAnd as and }

Source

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

SourceDocs

贡献者(Contributors)

日志(Changelog)

No recent changes

Released under the MIT License.