@cran/lib.vue.ref
Version:
Vue Reactivity Extensions
14 lines (11 loc) • 302 B
text/typescript
import { type MaybeWrapped, eagerComputed, unwrap } from "../utility";
/**
* @since 0.0.1
* @category Object
* @inheritdoc parseFloat
*/
export function useFloat<T> ( value: MaybeWrapped<T> ) {
return eagerComputed(function compute ( ) {
return parseFloat(unwrap(value) as string);
});
}