This is awesome. Love the thinking outside of box!
Quick comment, my expectation of this code was different. Instead of
console.log(obj[['b', 'c', 'e']]) // [6, 7, 9]
I thought I'd get
console.log(obj[['b', 'c', 'e']]) // { b: 6, c: 7, e: 9 }
That is more like _.pick instead of _.at (= R.props). I understand that it kind of breaks some of the combinations later.
It is possible to allow objects as properly accessors, but I think that would be cumbersome.
Yeah, I was torn between making the default behaviour do that, or what I ended up picking. One idea for the future is to make the behaviour switchable somehow
The library itself allows you to set it up how you like though
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This is awesome. Love the thinking outside of box!
Quick comment, my expectation of this code was different. Instead of
I thought I'd get
That is more like _.pick instead of _.at (= R.props). I understand that it kind of breaks some of the combinations later.
It is possible to allow objects as properly accessors, but I think that would be cumbersome.
Yeah, I was torn between making the default behaviour do that, or what I ended up picking. One idea for the future is to make the behaviour switchable somehow
The library itself allows you to set it up how you like though