z-pattern-matching / z

Pattern Matching for Javascript
https://z-pattern-matching.github.io/
Apache License 2.0
1.72k stars 50 forks source link

How is this possible? #30

Closed ccorcos closed 6 years ago

ccorcos commented 6 years ago

I see you're using js-function-reflector but does that mean you need to use babel-preset-es2015-reflector?

leonardiwagner commented 6 years ago

@ccorcos not directly, it's just a dependency of js-function-reflector but we don't use any feature of babel-preset-es2015-reflector. We could fork the library and remove that dependency if necessary. Is there any reason to justify that move?

ccorcos commented 6 years ago

No, I’m just curious how this works! Are you using Function.toString and parsing text? How does this work? On Sat, Nov 25, 2017 at 15:30 Wagner Leonardi notifications@github.com wrote:

@ccorcos https://github.com/ccorcos not directly, it's just a dependency of js-function-reflector but we don't use any feature of babel-preset-es2015-reflector. We could fork the library and remove that dependency if necessary. Is there any reason to justify that move?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/z-pattern-matching/z/issues/30#issuecomment-346973113, or mute the thread https://github.com/notifications/unsubscribe-auth/ABth3245_LnEChvIB-KNmI6nBLbaKqMmks5s6KMKgaJpZM4QqlII .

leonardiwagner commented 6 years ago

Yes, that's the js-function-reflector approach. It was very hard to find such lib that works well with lambda, default arguments, and new stuff, that was the only one I found which works well!

ccorcos commented 6 years ago

Isn't it going to break once you use a minifier though?