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 a geoOnce function. #1097

Merged
merged 1 commit into from
Jun 28, 2021
Merged

feat: Add a geoOnce function. #1097

merged 1 commit into from
Jun 28, 2021

Conversation

manthey
Copy link
Contributor

@manthey manthey commented Jun 28, 2021

This handles an event a single time and then deregisters the callback. Often, a program calls geoOn and in the handler calls geoOff. This allows just calling geoOnce. In order to cancel a geoOnce, the return value is the function that would have to be passed to geoOff.

This handles an event a single time and then deregisters the callback.
Often, a program calls geoOn and in the handler calls geoOff.  This
allows just calling geoOnce.  In order to cancel a geoOnce, the return
value is the function that would have to be passed to geoOff.
Copy link
Member

@aashish24 aashish24 left a comment

Choose a reason for hiding this comment

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

Looks reasonable and I have seen this pattern elsewhere as well

@manthey manthey merged commit 4d65b17 into master Jun 28, 2021
@manthey manthey deleted the geo-once branch June 28, 2021 18:45
@github-actions
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants