datavis-tech / topologica

Minimal library for reactive dataflow programming. Based on topological sort.
MIT License
50 stars 1 forks source link

Revise "get" API #28

Closed curran closed 6 years ago

curran commented 6 years ago

It would be simpler if .get just returned all the values, rather than accepting the property name as an argument. This would make it easier to get multiple values at once, and it would pair well with destructuring.

Before:

const a = state.get('a');
const b = state.get('b');

After

const { a, b } = state.get();

It would also be symmetric with set this way.