Skip to content
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

feat(publishLast): add publishLast operator #885

Merged
merged 1 commit into from
Dec 4, 2015

Conversation

kwonoj
Copy link
Member

@kwonoj kwonoj commented Dec 4, 2015

closes #883

This PR adds publishLast operator with initial test coverage, mostly mirrored from publish operator's test cases.

@kwonoj
Copy link
Member Author

kwonoj commented Dec 4, 2015

current implementation of multicast and other publish... does not have selector parameter implementation in RxJS4 (https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/operators/multicast.md#rxobservableprototypemulticastsubject--subjectselector-selector), this PR also doesn't have it yet. (not sure if selector is dropped or not)

@staltz
Copy link
Member

staltz commented Dec 4, 2015

Very good question about selector. I know Erik Meijer uses it idiomatically. What does @Blesh @trxcllnt think?

@staltz
Copy link
Member

staltz commented Dec 4, 2015

Otherwise, the PR looks perfect.

@benlesh
Copy link
Member

benlesh commented Dec 4, 2015

The selector in RxJS 4 is meant to make shared things semi reusable by hiding everything you're doing with it in a closure that you can repeat. This isn't really necessary now that you can make reusable connectable observables.

When I had asked Erik about it a long time ago, he told me that he only uses publish() with connect for the most part. Overall, I'm indifferent other than I don't want to introduce it if it's going to result in heavily polymorphic or slow implementations of the operators.

@kwonoj
Copy link
Member Author

kwonoj commented Dec 4, 2015

Since I personally do not have strong opinions of selector, I will not include those changes in this PR and would like to see if there's demand for those, such as someone might file an issue and allow further discussion if necessary.

@kwonoj
Copy link
Member Author

kwonoj commented Dec 4, 2015

PR is updated with rebase and add corresponding changes of add auto patching.

@benlesh benlesh merged commit 9bef228 into ReactiveX:master Dec 4, 2015
@kwonoj kwonoj deleted the feat-publishlast branch December 4, 2015 22:09
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement publishLast
3 participants