• Delays queuing until after ms milliseconds have elapsed since the last time this transformer received anything. The queuing behavior is configurable.

    Type Parameters

    • T

    Parameters

    Returns TransformStream<T, T>

    See

    Example

    Using the trailing behavior.

    --a-b-c--------------d-----------

    debounce(20)
    // Same as...
    debounce(20, new DebounceTrailingBehavior())

    -------------c---------------d---

    Example

    Using the leading behavior.

    --a-b-c--------------d-----------

    debounce(20, new DebounceLeadingBehavior())

    ---a------------------d----------

    Example

    Using both leading and trailing behaviors

    --a-b-c--------------d-----------

    debounce(20, [
    new DebounceLeadingBehavior(),
    new DebounceTrailingBehavior()
    ])

    ---a----------c--------d----------

Generated using TypeDoc