optics.js icon indicating copy to clipboard operation
optics.js copied to clipboard

get/set lenses (for Immutable.js, among others)

Open serras opened this issue 5 years ago • 3 comments

Stealing a great idea from partial.lenses, if we provide a special lens which simply calls get and set on the object, we can easily interoperate with Immutable.js without dependencies!

serras avatar Sep 30 '20 10:09 serras

This would also work for Map

serras avatar Sep 30 '20 11:09 serras

We should also check that values works for all these. Otherwise, it should be as easy as changing the getter in values to [...obj.values()], so it works everywhere an iterator can be obtained.

serras avatar Sep 30 '20 12:09 serras

Im new to opticsjs source code as well as lense 😬. Any pointer where should I look into 🤔?

bangn avatar Oct 02 '20 15:10 bangn