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

New accessor function to retrieve a list of values by keys #28

Closed
kabirbaidhya opened this issue Sep 28, 2019 · 1 comment · Fixed by #30
Closed

New accessor function to retrieve a list of values by keys #28

kabirbaidhya opened this issue Sep 28, 2019 · 1 comment · Fixed by #30
Assignees

Comments

@kabirbaidhya
Copy link
Contributor

New accessor function to retrieve a list of values by keys.

Example:

const a = 1;
const b = 2;
const sum = a + b;

store.set({ a, b });
store.set({ sum });

const contents = store.getByKeys(['a', 'b', 'sum']);
console.log(contents);
// > [1, 2, 3]

...
const [a, b, sum] = store.getByKeys(['a', 'b', 'sum']);
console.log({ a, b, sum });

// > { a: 1, b: 2, sum: 3 }
@spencerwi
Copy link
Contributor

I can pick this up.

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

Successfully merging a pull request may close this issue.

2 participants