UNPKG

@cran/lib.vue.ref

Version:

Vue Reactivity Extensions

9 lines (8 loc) 291 B
import { computed } from "vue"; import { wrapArrayPredicate } from "./ArrayPredicate"; import { unwrap } from "../utility"; export function useFilter(values, predicate) { return computed(function compute() { return unwrap(values).filter(wrapArrayPredicate(predicate)); }); }