-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order is lost by match's object #2
Comments
I'm bringing it up because:
|
JS objects are an unordered collection of properties. |
Not that pretty though... and one could use regular arrays in the first place. Meh TC39. |
Another possible syntax is fluent chaining when.range(0, 43, 42).
when(42, 72).
otherwise('will not be hit').
match(42) |
Would it be possible to support both chaining and objects? |
…dered collection of properties, match-when overcomes it
I knew this property of JS object but did not took the time to look into this since my main goal was first to make it work :) Now I've looked into this and found a solution to make it work (generating an incremental unique id at each call of when() and since when() will always be in the same I'm really against fluent chaining and only use it when I can't do it another way. |
I'm not sure if this is desired or not, but the following test
fails with
Not sure if it's really an issue or not, thoughts?
The text was updated successfully, but these errors were encountered: