Creates a function that invokes func at most once every wait milliseconds. Great for scroll, resize, and mousemove. Includes cancel and flush. Part of Lodash 4.x Function (since 0.1.0).
Pass the required arguments shown below. Most helpers return a new function you call later.
Syntax
Call _.throttle. Start with this line.
Lodash
_.throttle(func, [wait=0], [options={}])
Call
What it does
_.throttle(func, [wait=0], [options={}])
Primary signature.
_.throttle(func)
Wrap or transform a function.
Prefer import throttle from "lodash/throttle" when you want a smaller bundle.
Library declarations
Lodash
_.throttle(func, [wait=0], [options={}])
Parameters
Parameter
Description
func
Required. Function to rate-limit
wait
Optional. Minimum ms between invokes (default 0)
options.leading
Optional. Invoke on the start of a window (default true)
options.trailing
Optional. Invoke at the end of a window (default true)
Return Value
Return Value
Description
*
Throttled function with cancel / flush
Lodash Examples
Example 1 — Default Leading + Trailing
A tight burst often yields two runs with the default options.
Lodash
var runs = 0;
var tick = _.throttle(function () {
runs += 1;
}, 100);
for (var i = 0; i < 30; i++) tick();
// after ~150ms → runs === 2 (leading + trailing)
Docs. See David Corbacho’s article linked from the Lodash docs for deeper nuance.
Compatibility
Browser & Runtime Support
_.throttle is a long-standing Lodash 4.x Function helper (since 0.1.0). It runs anywhere Lodash runs — modern browsers (via CDN or bundle) and Node.js / Bun / Deno with npm install lodash.
✓ Stable · Lodash 0.1.0+
_.throttle()
Available in [email protected] full builds and the lodash/throttle modular import. Works in evergreen browsers and current Node LTS when Lodash is installed.
100%With Lodash
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
_.throttleLodash 0.1.0+
Bottom line: Safe for production once Lodash is on the page or in your bundle. Prefer import throttle from "lodash/throttle" for smaller builds. For quiet-time delays, use _.debounce.
Frequently Asked Questions
_.throttle(func, wait, options) returns a function that invokes func at most once every wait milliseconds while calls keep arriving. Defaults use leading and trailing edges.
Debounce waits for quiet time after the last call. Throttle guarantees periodic execution during continuous bursts — better for scroll and resize listeners.
cancel() drops a pending delayed invocation. flush() immediately invokes a pending trailing call when configured.
The last arguments provided to the throttled wrapper.
Trailing fires only if the wrapper was invoked more than once during the wait window — so a rapid burst often yields two runs (leading + trailing), not one.
Use import throttle from "lodash/throttle" or require("lodash/throttle") for tree-shaking friendly bundles. Full build: import _ from "lodash" then _.throttle.