DEV Community

Discussion on: Pattern-Match your JavaScript with Z

Collapse
kayis profile image
K (he/him) Author

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...

Collapse
halcaponey_35 profile image
halcaponey

and js-function-reflector uses the toString() method availaible on functions

Thread Thread
joelnet profile image
JavaScript Joel

the toString()

That doesn't seem like it would work for minified code as the parameter names would be uglified.

Thread Thread
kayis profile image
K (he/him) Author

It works as long as you don't compile the default arguments to ES5.