UNPKG

@cran/lib.vue.ref

Version:

Vue Reactivity Extensions

12 lines (11 loc) 295 B
import { eagerComputed, unwrap } from "../utility"; /** * @since 0.2.3 * @category Object */ export function useArray(value) { return eagerComputed(function compute() { const unwrapped = unwrap(value); return Array.isArray(unwrapped) ? unwrapped : [unwrapped,]; }); }