NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #3336 most downloaded on npm
Delay a promise a specified amount of time
Last release 11 months ago
31 Oct 2025
Release timing varies
gaps range from 2 weeks to 2.4 years
Some releases are documented
notes for 9 of 19 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
19 releases · first in 2012
Add support for unlimited delays 8f9d742
https://github.com/sindresorhus/delay/compare/v6.0.0...v7.0.0
This package is now pure ESM. Please [read this](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
delay.reject() method.
const delay = require('delay'); delay.clear(…); → import {clearDelay} from 'delay'; clearDelay(…);const delay = require('delay'); delay.range(…); → import {rangeDelay} from 'delay'; rangeDelay(…);const delay = require('delay'); delay.createWithTimers(…); → import {createDelay} from 'delay'; createDelay(…);If you only target Node.js and not the browser, I recommend moving to the built-in method whenever possible:
import {setTimeout} from 'node:timers/promises';
await setTimeout(1000);
https://github.com/sindresorhus/delay/compare/v5.0.0...v6.0.0
One column per quarter.
Require Node.js 10 (#55) f3c7542
range() in createWithTimers() return value (#55) f3c7542https://github.com/sindresorhus/delay/compare/v4.4.1...v5.0.0
Loosen up the createWithTimers types df95c9e
createWithTimers types df95c9ehttps://github.com/sindresorhus/delay/compare/v4.4.0...v4.4.1
Add `.range()` method (#51) aa0a2e4
.range() method (#51) aa0a2e4https://github.com/sindresorhus/delay/compare/v4.3.0...v4.4.0
Allow sinon.useFakeTimers() to modify setTimeout() and clearTimeout() (used by delay) after delay loads (#45) 1316fd7
Enhancements:
sinon.useFakeTimers() to modify setTimeout() and clearTimeout() (used by delay) after delay loads (#45) 1316fd7https://github.com/sindresorhus/delay/compare/v4.2.0...v4.3.0
Refactor TypeScript definition to CommonJS compatible export (#44) fa2d83c
https://github.com/sindresorhus/delay/compare/v4.1.0...v4.2.0
Add delay.createWithTimers() method. https://github.com/sindresorhus/delay/commit/e589469fe9d86696a606b0c7cb888f999b9aea91
delay.createWithTimers() method. https://github.com/sindresorhus/delay/commit/e589469fe9d86696a606b0c7cb888f999b9aea91https://github.com/sindresorhus/delay/compare/v4.0.1...v4.1.0
Nothing published for this version
The value argument is now an options-object.
The value argument is now an options-object.
- await delay(100, '🦄');
+ await delay(100, {value: '🦄'});
And we added support for AbortController.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →