Cofounded Host Collective (DiscountASP.net). Cofounded Player Axis (Social Gaming). Computer Scientist and Technology Evangelist with 20+ years of experience with JavaScript!
Cofounded Host Collective (DiscountASP.net). Cofounded Player Axis (Social Gaming). Computer Scientist and Technology Evangelist with 20+ years of experience with JavaScript!
This is incredible. I have a lot of questions regarding how this is done. I use Ramda's
cond
quite a bit. But I really like this syntax.I'm curious to see how this works when minified. I believe it is using some type of reflection.
It seems to use a package called
js-function-reflector
which transforms a function object to it's string representation and parses it again.github.com/arrizalamin/js-function...
and
js-function-reflector
uses the toString() method availaible on functionsThat doesn't seem like it would work for minified code as the parameter names would be uglified.
It works as long as you don't compile the default arguments to ES5.