@cran/lib.vue.ref
Version:
Vue Reactivity Extensions
14 lines (13 loc) • 368 B
JavaScript
import { computed } from "vue";
import { wrapArrayPredicate } from "./ArrayPredicate";
import { unwrap } from "../utility";
/**
* @since 0.0.1
* @category Array
* @inheritdoc Array#findLast
*/
export function useFindLast(values, predicate) {
return computed(function compute() {
return unwrap(values).findLast(wrapArrayPredicate(predicate));
});
}