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: onFirst and onLast operators #45

Merged
merged 2 commits into from
Nov 14, 2024
Merged

feat: onFirst and onLast operators #45

merged 2 commits into from
Nov 14, 2024

Conversation

andogq
Copy link
Member

@andogq andogq commented Nov 14, 2024

Simple way to run a callback once the first or last atom has passed through the stream.

@andogq andogq requested a review from giraugh November 14, 2024 05:36
@andogq andogq self-assigned this Nov 14, 2024
Copy link

changeset-bot bot commented Nov 14, 2024

🦋 Changeset detected

Latest commit: 7c566d2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
windpipe Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

@giraugh giraugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good B) and even has tests 👍

Is there a world where we would ever want that callback to be async and to pause the stream while it runs? No worries if not though, just thinking of possible use cases

@andogq
Copy link
Member Author

andogq commented Nov 14, 2024

Interesting thought. I wouldn't rule it out, but I'm also probably not going to worry once we have a definite use case for blocking the stream like that.

@andogq andogq merged commit 507ca15 into main Nov 14, 2024
1 check passed
@andogq andogq deleted the feat/on-first-last branch November 14, 2024 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants