@cran/lib.vue.ref
Version:
Vue Reactivity Extensions
14 lines (11 loc) • 313 B
text/typescript
import { type MaybeWrapped, eagerComputed, unwrap } from "../utility";
/**
* @since 0.0.1
* @category Math
* @inheritdoc Math.max
*/
export function useMax ( ...values: Array<MaybeWrapped<number>> ) {
return eagerComputed(function compute ( ) {
return Math.max(...values.map<number>(unwrap));
});
}