Closed asam139 closed 3 years ago
Hey @asam139 - I appreciate the sentiment, and we actually have this operator in our own codebase. However, it feels a bit too opinionated from one hand, and too trivial on the other hand.
Meaning, it is not helpful or wanted for everyone, but it takes a second to add it if you're interested (similarly to mapTrue()
, mapFalse()
, mapOptional()
and other tidbits we like and use in our code base).
WDYT ?
Ok, you've convinced me 🤣, I will add to my own extensions.
Name and description
Add
mapToVoid
to map any observable type to void.Motivation for inclusion
I am tired to see
map { _ in }
in the codeExample of use
myObserver.mapToVoid()
in place ofmyObserver.map { _ in }
Code