Skip to content

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

Closed
@kabirbaidhya

Description

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 }

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions