@cran/lib.vue.ref
Version:
Vue Reactivity Extensions
13 lines (12 loc) • 360 B
JavaScript
import { computed } from "vue";
import { unwrap } from "../utility";
/**
* @since 0.0.1
* @category Array
* @inheritdoc Array#lastIndexOf
*/
export function useLastIndexOf(values, searchElement, fromIndex) {
return computed(function compute() {
return unwrap(values).map(unwrap).lastIndexOf(unwrap(searchElement), unwrap(fromIndex));
});
}