@cran/lib.vue.ref
Version:
Vue Reactivity Extensions
17 lines (16 loc) • 572 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.useLastIndexOf = void 0;
const vue_1 = require("vue");
const utility_1 = require("../utility");
/**
* @since 0.0.1
* @category Array
* @inheritdoc Array#lastIndexOf
*/
function useLastIndexOf(values, searchElement, fromIndex) {
return (0, vue_1.computed)(function compute() {
return (0, utility_1.unwrap)(values).map(utility_1.unwrap).lastIndexOf((0, utility_1.unwrap)(searchElement), (0, utility_1.unwrap)(fromIndex));
});
}
exports.useLastIndexOf = useLastIndexOf;