Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Apply VueUse composables in Vue 3/Nuxt projects to replace custom implementations with battle-tested utilities.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/logicAnd.md
1---2category: '@Math'3alias: and4related: logicNot, logicOr5---67# logicAnd89`AND` condition for refs.1011## Usage1213```ts14import { whenever } from '@vueuse/core'15import { logicAnd } from '@vueuse/math'1617const a = ref(true)18const b = ref(false)1920whenever(logicAnd(a, b), () => {21console.log('both a and b are now truthy!')22})23```2425## Type Declarations2627```ts28/**29* `AND` conditions for refs.30*31* @see https://vueuse.org/logicAnd32*33* @__NO_SIDE_EFFECTS__34*/35export declare function logicAnd(36...args: MaybeRefOrGetter<any>[]37): ComputedRef<boolean>38/** @deprecated use `logicAnd` instead */39export declare const and: typeof logicAnd40```41