and

AND condition for refs.

Usage

import { and } from '@vueuse/core'

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

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

Type Declarations

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

Source

SourceDocs