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

Support options { leading, trailing } in throttle #714

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

Conversation

raimohanska
Copy link
Contributor

Similartly to Kefir.js, throttle now supports options { leading, trailing }. The default is trailing output, so that existing behaviour doesn't change.

Implements #702

@raimohanska
Copy link
Contributor Author

Readme update needed.

@Phoscur
Copy link

Phoscur commented Feb 14, 2018

I like the new leading option! It's only said to see the old throttle implementation go, it was so simple and nice

@Phoscur
Copy link

Phoscur commented Feb 14, 2018

debounce & debounceImmediate could be merged with the same configurations.. and maybe a third one: doubleEdged when both leading and trailing are true :)

@raimohanska
Copy link
Contributor Author

Yeah the new implementation looks more complicated. OTOH it will most likely perform better. The impl is very much borrowed from Kefir, which had the { leading, trailing } params supported already.

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