logicAnd
Category
Export Size
204 B
Package
@vueuse/math
Last Changed
6 months ago
Alias
and
Related
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
Contributors
Curt Grimes
Anthony Fu