greenpress / vuex-composition-helpers

A util package to use Vuex with Composition API easily.
https://www.npmjs.com/package/vuex-composition-helpers
MIT License
288 stars 32 forks source link

Can you tell me the test case scenario of useFromObject #53

Open vnues opened 2 years ago

vnues commented 2 years ago
function useFromObject<T>(store: any, namespace: string | null, props: TMap<KnownKeys<T>>[], cb: Function) {
    const obj= Object.create(null);
    for (let key in props) {
        if (props.hasOwnProperty(key)) {
            obj[key] = runCB(cb, store, namespace, props[key]);
        }
    }
    return obj;
}
davidmeirlevy commented 2 years ago

we probably don't have. would you like to add them?

vnues commented 2 years ago

we probably don't have. would you like to add them?

The parameter is an array, useFromObject should not be needed