Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vnues opened this issue Oct 2, 2021 · 2 comments
Open

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

vnues opened this issue Oct 2, 2021 · 2 comments

Comments

@vnues
Copy link

vnues commented Oct 2, 2021

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
Copy link
Contributor

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

@vnues
Copy link
Author

vnues commented Oct 3, 2021

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

The parameter is an array, useFromObject should not be needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants