3 ms·
Z – A JavaScript pattern matching library
- Ideabile 9y agoThis is a beautiful syntax for pattern matching! Love it! Although some advice, that you might thing are right or not. Doesn't matter. Disclaimer: I'm just saw the idea and I din't run any investigation on existing solutions. Suggestions / Questions: - A plus would be having a "promise version" that could resolve .if() || .else || .elseif || .all || .then || .final || .catch would be awesome to be combine with generators or just async/await. - I would love to have it, build-in of ECMAScript, so could you think of something that could fit in a draft and could be pluggable in babel? as a POC? (Would be worth it?) - The website, by layout, says "I wanna sell you something, that has little to do with coding!" I know is about taste, but thats my feeling on it, is just a minor irrelevant thing. Anyway I like the API that you're delivering. Nice neat syntax, I would see if during my coding I get a chance to give it a try, I would tell you the results of it.