BACK
Referencethrottle
Reference · 109

throttle

Lets the first value through and silences the stream until the duration Observable completes.

Signature

throttle(durationSelector: (value: T) => ObservableInput): MonoTypeOperatorFunction

What it does

Once a value passes, it starts durationSelector. While that Observable is active, new values are ignored, or handled by the leading/trailing config.

When to use

Capping the rate of actions: submit, scroll, resize, pointermove, analytics events.

See also

throttleTime, audit, debounce

script.ts // TypeScript
CONSOLE · Console output
Hit Run to see the result...