datavis-tech / topologica

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

Investigate function arguments detection #51

Open curran opened 5 years ago

curran commented 5 years ago

Split out from #49. /cc @caracal7

curran commented 5 years ago

The reason originally I did not go for function arguments detection is that it fails under minification.

There may be other ways to do detection of arguments, like the way Vue.js and MobX does it, but this forces us to evaluate the reactive function before all inputs are ready, just to check what inputs are accessed (which would fail if there are conditionals in the function body). This approach would force users of the library to guard against null values for inputs, which is not ideal.

caracal7 commented 5 years ago

https://www.npmjs.com/package/es-arguments I use this package because it handle arrow functions and in my tests works great in any cases