@cran/lib.vue.ref
Version:
Vue Reactivity Extensions
17 lines (16 loc) • 466 B
JavaScript
import { eagerComputed, unwrap } from "../utility";
/**
* @since 0.0.1
* @category Array
*/
export function useNone(values, predicate) {
return eagerComputed(function compute() {
const unwrapped = unwrap(values);
for (let index = 0, { length, } = unwrapped; index < length; ++index) {
if (predicate(unwrap(unwrapped[index]), index, unwrapped)) {
return false;
}
}
return true;
});
}