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/useAbs.md
1---2category: '@Math'3---45# useAbs67Reactive `Math.abs`.89## Usage1011```ts12import { useAbs } from '@vueuse/math'1314const value = ref(-23)15const absValue = useAbs(value) // Ref<23>16```1718## Type Declarations1920```ts21/**22* Reactive `Math.abs`.23*24* @see https://vueuse.org/useAbs25*26* @__NO_SIDE_EFFECTS__27*/28export declare function useAbs(29value: MaybeRefOrGetter<number>,30): ComputedRef<number>31```32