8000 @debounce is named improperly — should be @throttle · Issue #9 · developit/decko · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
@debounce is named improperly — should be @throttle #9
Open
@ivancuric

Description

@ivancuric

In the docs its says:

To debounce means "call this at most once per N ms". All outward function calls get collated into a single inward call, and only the latest (most recent) arguments as passed on to the debounced function.

What you're doing is throttling, not debouncing.
lodash.throttle:

Creates a throttled function that only invokes func at most once per every wait milliseconds.

lodash.debounce:

Creates a debounced function that delays invoking func until after wait milliseconds have elapsed since the last time the debounced function was invoked.

And while on the topic, a (real) @debounce would be a great addition.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0