@cran/lib.vue.ref
Version:
Vue Reactivity Extensions
16 lines (13 loc) • 335 B
text/typescript
import { type MaybeWrapped, eagerComputed, unwrap } from "../utility";
/**
* @since 0.0.1
* @category Object
* @inheritdoc Object.entries
*/
export function useEntries<T> (
value: MaybeWrapped<ArrayLike<T> | Record<string, T>>
) {
return eagerComputed(function compute ( ) {
return Object.entries(unwrap(value));
});
}