_.delay is a Lodash 4.x Function helper (since 0.1.0). It runs anywhere Lodash runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install lodash. Built on timer APIs similar to setTimeout.
✓ Stable · Lodash 0.1+
_.delay()
Available in [email protected] full builds and the lodash/delay modular import. Works in evergreen browsers and current Node LTS when Lodash is installed.
100%With Lodash 4.x
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
_.delayLodash 0.1+
Bottom line: Safe for production once Lodash is loaded. Prefer import delay from "lodash/delay" for smaller builds. Native setTimeout is fine when you do not need Lodash’s arg-forwarding style.
Frequently Asked Questions
_.delay(func, wait, ...args) invokes func after wait milliseconds and forwards any extra arguments to func.
A timer id (number), like setTimeout — you can clearTimeout it.
delay uses your wait in ms. defer always schedules after the current stack with a tiny fixed delay.
Yes. A 0 wait still runs asynchronously on the timer queue — not synchronously.
Same idea. Lodash adds a consistent API and easy variadic arg forwarding: _.delay(fn, wait, a, b).
No. It schedules one invocation. Use setInterval or a loop of delays for repeats.