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: Add tapOnce and tapOnceOnFirstTruthy Operators #490

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

endlacer
Copy link

This pull request adds two new standalone RxJS operators, tapOnce and tapOnceOnFirstTruthy, to the utility library. These operators allow for conditional execution of functions based on emitted values.

tapOnce: Executes the provided function only once when the value at the specified index is emitted.
tapOnceOnFirstTruthy: Executes the provided function only once when the first truthy value is emitted.

What are your thoughts on these operators? They seem particularly useful for scenarios where you need to initialize something, such as a modal element, as soon as the first value from a source is emitted.

This is my first PR on GitHub, so I appreciate your patience :)! Any contributions, feedback, or change requests are more than welcome.

@endlacer endlacer marked this pull request as ready for review September 2, 2024 08:08
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.

1 participant