@foxyimg/vue-utils
v0.1.8
Published
![Foxy Image Logo](https://aspekt-media.b-cdn.net/logo.png)
Downloads
5
Readme
@foxyimg/vue-utils
A utility functions and composables for use with Vue.
Usage
Install package:
# ✨ Auto-detect
npx nypm install @foxyimg/vue-utils
# npm
npm install @foxyimg/vue-utils
# yarn
yarn add @foxyimg/vue-utils
# pnpm
pnpm install @foxyimg/vue-utils
# bun
bun install @foxyimg/vue-utils
Usage:
import { useWritableWrappedRef, useClampedRef } from "@foxyimg/vue-utils";
const someRef = useWritableWrappedRef(25, 0, 100); // current value: 25
someRef.value = 102; // current value: 1
const someOtherRef = ref(12);
const clampedRef = useClampedRef(someOtherRef, 0, 15); // clampedRef's current value: 12
someOtherRef.value = 23; // clampedRef's current value: 15
License
Published under the MIT license.