{"_id":"delay","_rev":"4106675","name":"delay","description":"Delay a promise a specified amount of time","dist-tags":{"latest":"7.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2026-01-11T18:56:04.000Z","created":"2012-07-19T18:05:36.578Z","7.0.0":"2025-10-31T16:34:13.621Z","6.0.0":"2023-05-21T15:57:14.287Z","5.0.0":"2021-02-01T15:29:35.501Z","4.4.1":"2021-01-30T07:34:26.464Z","4.4.0":"2020-07-18T14:00:22.465Z","4.3.0":"2019-06-12T18:13:34.427Z","4.2.0":"2019-04-08T11:01:38.966Z","4.1.0":"2018-10-10T08:57:56.913Z","4.0.1":"2018-09-10T12:26:15.695Z","4.0.0":"2018-09-03T04:01:06.939Z","3.1.0":"2018-08-20T18:24:14.002Z","3.0.0":"2018-05-25T16:41:07.544Z","2.0.0":"2017-03-22T13:56:49.849Z","1.3.1":"2015-12-27T12:56:26.936Z","1.3.0":"2015-12-25T22:02:10.048Z","1.2.0":"2015-12-24T00:36:09.045Z","1.1.0":"2015-11-13T04:14:08.608Z","1.0.0":"2015-11-12T18:36:53.776Z","0.0.1":"2012-07-19T18:05:36.578Z"},"users":{"allenmoore":true,"sqrtthree":true,"tdmalone":true,"rocket0191":true,"yageek":true,"quocnguyen":true,"modood":true,"gzg1500521074":true,"zuojiang":true,"shaunieb":true,"vidhill":true,"potato4d":true,"ash":true,"hackey9":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/delay.git"},"versions":{"7.0.0":{"name":"delay","version":"7.0.0","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/delay.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=20"},"scripts":{"test":"xo && node --test && tsd"},"keywords":["promise","resolve","delay","defer","wait","stall","timeout","settimeout","event","loop","next","tick","delay","async","await","promises","bluebird","threshold","range","random"],"dependencies":{"random-int":"^3.1.0","unlimited-timeout":"^0.1.0"},"devDependencies":{"in-range":"^3.0.0","time-span":"^5.1.0","tsd":"^0.33.0","xo":"^1.2.3"},"gitHead":"29edc4c9e784a4220c2de4e21a180a5b82a0bbd9","types":"./index.d.ts","_id":"delay@7.0.0","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay#readme","_nodeVersion":"20.19.5","_npmVersion":"11.6.1","dist":{"shasum":"e7c578be75844c18cefe73eaa760d65994557918","size":3590,"noattachment":false,"key":"/delay/-/delay-7.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-7.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/delay_7.0.0_1761928453444_0.15432130967615265"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-10-31T16:34:13.621Z","publish_time":1761928453621,"_source_registry_name":"default","_cnpm_publish_time":1761928453621},"6.0.0":{"name":"delay","version":"6.0.0","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/delay.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","resolve","delay","defer","wait","stall","timeout","settimeout","event","loop","next","tick","delay","async","await","promises","bluebird","threshold","range","random"],"devDependencies":{"ava":"5.2.0","in-range":"^3.0.0","time-span":"^5.1.0","tsd":"^0.28.1","xo":"^0.54.2"},"ava":{"serial":true},"types":"./index.d.ts","gitHead":"49511f208f9b530cdf5b4f86985d8559999b1a67","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay#readme","_id":"delay@6.0.0","_nodeVersion":"20.1.0","_npmVersion":"9.2.0","dist":{"shasum":"43749aefdf6cabd9e17b0d00bd3904525137e607","size":3632,"noattachment":false,"key":"/delay/-/delay-6.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-6.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/delay_6.0.0_1684684634084_0.0218543836975833"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-05-21T15:57:14.287Z","publish_time":1684684634287,"_source_registry_name":"default","_cnpm_publish_time":1684684634287},"5.0.0":{"name":"delay","version":"5.0.0","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/delay.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","resolve","delay","defer","wait","stall","timeout","settimeout","event","loop","next","tick","delay","async","await","promises","bluebird","threshold","range","random"],"devDependencies":{"abort-controller":"^3.0.0","ava":"1.4.1","currently-unhandled":"^0.4.1","in-range":"^1.0.0","time-span":"^3.0.0","tsd":"^0.7.1","xo":"^0.24.0"},"gitHead":"ab98ae8dfcb38e1593286c94d934e70d14a4e111","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay#readme","_id":"delay@5.0.0","_nodeVersion":"14.15.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"137045ef1b96e5071060dd5be60bf9334436bd1d","size":4058,"noattachment":false,"key":"/delay/-/delay-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-5.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/delay_5.0.0_1612193375345_0.2283152656066605"},"_hasShrinkwrap":false,"publish_time":1612193375501,"_cnpm_publish_time":1612193375501},"4.4.1":{"name":"delay","version":"4.4.1","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/delay.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","resolve","delay","defer","wait","stall","timeout","settimeout","event","loop","next","tick","delay","async","await","promises","bluebird","threshold","range","random"],"devDependencies":{"abort-controller":"^3.0.0","ava":"1.4.1","currently-unhandled":"^0.4.1","in-range":"^1.0.0","time-span":"^3.0.0","tsd":"^0.7.1","xo":"^0.24.0"},"gitHead":"7e47ec87f745828afd495b45697111f6ab823415","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay#readme","_id":"delay@4.4.1","_nodeVersion":"14.15.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"6e02d02946a1b6ab98b39262ced965acba2ac4d1","size":4054,"noattachment":false,"key":"/delay/-/delay-4.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-4.4.1.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/delay_4.4.1_1611992065823_0.9125768890345878"},"_hasShrinkwrap":false,"publish_time":1611992066464,"_cnpm_publish_time":1611992066464},"4.4.0":{"name":"delay","version":"4.4.0","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/delay.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","resolve","delay","defer","wait","stall","timeout","settimeout","event","loop","next","tick","delay","async","await","promises","bluebird","threshold","range","random"],"devDependencies":{"abort-controller":"^3.0.0","ava":"1.4.1","currently-unhandled":"^0.4.1","in-range":"^1.0.0","time-span":"^3.0.0","tsd":"^0.7.1","xo":"^0.24.0"},"gitHead":"bcfc9659eb7fbe5e47a6a60b80857c873eb77e2c","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay#readme","_id":"delay@4.4.0","_nodeVersion":"14.5.0","_npmVersion":"6.14.5","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"71abc745f3ce043fe7f450491236541edec4ad0c","size":3926,"noattachment":false,"key":"/delay/-/delay-4.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-4.4.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/delay_4.4.0_1595080822362_0.5752925378398641"},"_hasShrinkwrap":false,"publish_time":1595080822465,"_cnpm_publish_time":1595080822465},"4.3.0":{"name":"delay","version":"4.3.0","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/delay.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","resolve","delay","defer","wait","stall","timeout","settimeout","event","loop","next","tick","delay","async","await","promises","bluebird"],"devDependencies":{"abort-controller":"^3.0.0","ava":"1.4.1","currently-unhandled":"^0.4.1","in-range":"^1.0.0","time-span":"^3.0.0","tsd":"^0.7.1","xo":"^0.24.0"},"gitHead":"1fa312b57450a6d8d39d52ac55f476109474bfe3","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay#readme","_id":"delay@4.3.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"efeebfb8f545579cb396b3a722443ec96d14c50e","size":3485,"noattachment":false,"key":"/delay/-/delay-4.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-4.3.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/delay_4.3.0_1560363214298_0.22394889349231395"},"_hasShrinkwrap":false,"publish_time":1560363214427,"_cnpm_publish_time":1560363214427},"4.2.0":{"name":"delay","version":"4.2.0","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/delay.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","resolve","delay","defer","wait","stall","timeout","settimeout","event","loop","next","tick","delay","async","await","promises","bluebird"],"devDependencies":{"abort-controller":"^3.0.0","ava":"1.4.1","currently-unhandled":"^0.4.1","in-range":"^1.0.0","time-span":"^3.0.0","tsd":"^0.7.1","xo":"^0.24.0"},"gitHead":"37c832b90de887c89dddb833b85d093acc90d649","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay#readme","_id":"delay@4.2.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"3f6c39dbd28aef50355e670fecee050ef01242ce","size":3472,"noattachment":false,"key":"/delay/-/delay-4.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-4.2.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/delay_4.2.0_1554721298791_0.7755370555598469"},"_hasShrinkwrap":false,"publish_time":1554721298966,"_cnpm_publish_time":1554721298966},"4.1.0":{"name":"delay","version":"4.1.0","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/delay.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd-check"},"keywords":["promise","resolve","delay","defer","wait","stall","timeout","settimeout","event","loop","next","tick","delay","async","await","promises","bluebird"],"devDependencies":{"abort-controller":"^1.0.2","ava":"1.0.0-beta.8","currently-unhandled":"^0.4.1","in-range":"^1.0.0","time-span":"^2.0.0","tsd-check":"^0.2.1","xo":"*"},"gitHead":"3217a33cb28718430a0e83bff6dad638f10ee6ce","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay#readme","_id":"delay@4.1.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"474cd28809da41d1a048a70a1d835f47ac377cd2","size":3409,"noattachment":false,"key":"/delay/-/delay-4.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-4.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/delay_4.1.0_1539161876814_0.16979727890561946"},"_hasShrinkwrap":false,"publish_time":1539161876913,"_cnpm_publish_time":1539161876913},"4.0.1":{"name":"delay","version":"4.0.1","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/delay.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd-check"},"keywords":["promise","resolve","delay","defer","wait","stall","timeout","settimeout","event","loop","next","tick","delay","async","await","promises","bluebird"],"devDependencies":{"abort-controller":"^1.0.2","ava":"1.0.0-beta.8","currently-unhandled":"^0.4.1","in-range":"^1.0.0","time-span":"^2.0.0","tsd-check":"^0.2.1","xo":"*"},"gitHead":"0c4de4cf89ddc7f740ce32d220c0e87291aea894","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay#readme","_id":"delay@4.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"052120e49bc3617a92e9a6cd9556be2cf23397a0","size":3036,"noattachment":false,"key":"/delay/-/delay-4.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-4.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/delay_4.0.1_1536582375543_0.48729241966474013"},"_hasShrinkwrap":false,"publish_time":1536582375695,"_cnpm_publish_time":1536582375695},"4.0.0":{"name":"delay","version":"4.0.0","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/delay.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava && tsd-check"},"keywords":["promise","resolve","delay","defer","wait","stall","timeout","settimeout","event","loop","next","tick","delay","async","await","promises","bluebird"],"devDependencies":{"abort-controller":"^1.0.2","ava":"1.0.0-beta.8","currently-unhandled":"^0.4.1","in-range":"^1.0.0","time-span":"^2.0.0","tsd-check":"^0.1.0","xo":"*"},"xo":{"ignores":["*.ts"]},"gitHead":"31e7f33c47ebd3b93aa27b2dd9ba8736d22eb9fa","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay#readme","_id":"delay@4.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"a890c37829b5cd39ffe1be7453849f5a8169d5de","size":3038,"noattachment":false,"key":"/delay/-/delay-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-4.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/delay_4.0.0_1535947266745_0.8170597622684077"},"_hasShrinkwrap":false,"publish_time":1535947266939,"_cnpm_publish_time":1535947266939},"3.1.0":{"name":"delay","version":"3.1.0","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/delay.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava"},"files":["index.js","index.d.ts"],"keywords":["promise","resolve","delay","defer","wait","stall","timeout","settimeout","event","loop","next","tick","delay","async","await","promises","bluebird"],"devDependencies":{"ava":"*","currently-unhandled":"^0.4.1","in-range":"^1.0.0","time-span":"^2.0.0","xo":"*"},"xo":{"ignores":["index.d.ts"]},"gitHead":"c17e29b13c20e6be35d64d75f45ce174bb793158","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay#readme","_id":"delay@3.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"fb7e64afbcea7f3c73435f3fb028d44e07734117","size":2508,"noattachment":false,"key":"/delay/-/delay-3.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-3.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/delay_3.1.0_1534789453875_0.17392457792762306"},"_hasShrinkwrap":false,"publish_time":1534789454002,"_cnpm_publish_time":1534789454002},"3.0.0":{"name":"delay","version":"3.0.0","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/delay.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=6"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","resolve","delay","defer","wait","stall","timeout","settimeout","event","loop","next","tick","delay","async","await","promises","bluebird"],"devDependencies":{"ava":"*","currently-unhandled":"^0.4.1","in-range":"^1.0.0","time-span":"^2.0.0","xo":"*"},"gitHead":"2e202e5c78afbbe7e3009a765d260bcdbb219256","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay#readme","_id":"delay@3.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"97fc5c21028e20616e822ab11838c648808534eb","size":2180,"noattachment":false,"key":"/delay/-/delay-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/delay_3.0.0_1527266467481_0.01406722200097299"},"_hasShrinkwrap":false,"publish_time":1527266467544,"_cnpm_publish_time":1527266467544},"2.0.0":{"name":"delay","version":"2.0.0","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/delay.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","resolve","delay","defer","wait","stall","timeout","settimeout","event","loop","next","tick","delay","async","await","promises","bluebird"],"dependencies":{"p-defer":"^1.0.0"},"devDependencies":{"ava":"*","bluebird":"^3.3.5","in-range":"^1.0.0","loud-rejection":"^1.3.0","time-span":"^1.0.0","xo":"^0.16.0"},"gitHead":"1517859e3a2cd4ee2b16c57ff22b1c94591ec192","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay#readme","_id":"delay@2.0.0","_shasum":"9112eadc03e4ec7e00297337896f273bbd91fae5","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.7.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"9112eadc03e4ec7e00297337896f273bbd91fae5","size":2503,"noattachment":false,"key":"/delay/-/delay-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/delay-2.0.0.tgz_1490191009624_0.6713550852146"},"directories":{},"publish_time":1490191009849,"_cnpm_publish_time":1490191009849,"_hasShrinkwrap":false},"1.3.1":{"name":"delay","version":"1.3.1","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/delay"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.12.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","resolve","delay","defer","wait","timeout","settimeout","event","loop","next","tick","delay","timeout"],"devDependencies":{"ava":"*","in-range":"^1.0.0","time-span":"^1.0.0","xo":"*"},"gitHead":"66fb6b8a3a918cda502a967eb94118aba4be6eff","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay","_id":"delay@1.3.1","_shasum":"a2a8a61c76a4d50b670fe2ab2d51cb03802bba98","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.2.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"a2a8a61c76a4d50b670fe2ab2d51cb03802bba98","size":2044,"noattachment":false,"key":"/delay/-/delay-1.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-1.3.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1451220986936,"_cnpm_publish_time":1451220986936,"_hasShrinkwrap":false},"1.3.0":{"name":"delay","version":"1.3.0","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/delay.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.12.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","resolve","delay","defer","wait","timeout","settimeout","event","loop","next","tick","delay","timeout"],"devDependencies":{"ava":"*","in-range":"^1.0.0","time-span":"^1.0.0","xo":"*"},"gitHead":"ea2cfc29edd2763d96dabc6c1e5e4f77649aa4b4","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay#readme","_id":"delay@1.3.0","_shasum":"e4f0b39d344fc35eca4ffe3e00476c40458e17d6","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"e4f0b39d344fc35eca4ffe3e00476c40458e17d6","size":1987,"noattachment":false,"key":"/delay/-/delay-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-1.3.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1451080930048,"_cnpm_publish_time":1451080930048,"_hasShrinkwrap":false},"1.2.0":{"name":"delay","version":"1.2.0","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/delay"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.12.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","resolve","delay","defer","wait","timeout","settimeout","event","loop","next","tick","delay","timeout"],"devDependencies":{"ava":"*","in-range":"^1.0.0","time-span":"^1.0.0","xo":"*"},"gitHead":"13702275198a109599f4b259b785ab0ff9ee6f6a","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay","_id":"delay@1.2.0","_shasum":"f0512d53dc0dde779cf363fad7df44a7450e534a","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.2.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"f0512d53dc0dde779cf363fad7df44a7450e534a","size":1725,"noattachment":false,"key":"/delay/-/delay-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-1.2.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1450917369045,"_cnpm_publish_time":1450917369045,"_hasShrinkwrap":false},"1.1.0":{"name":"delay","version":"1.1.0","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/delay"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.12.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","resolve","delay","defer","wait","timeout","settimeout","event","loop","next","tick","delay","timeout"],"devDependencies":{"ava":"*","xo":"*"},"xo":{"ignores":["test.js"]},"gitHead":"9f6fd2c09cd646c7993cd78fa9f97649ba2cec0e","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay","_id":"delay@1.1.0","_shasum":"a9e48d3d400e3bab805fa650d5524bcb588cb471","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"a9e48d3d400e3bab805fa650d5524bcb588cb471","size":1653,"noattachment":false,"key":"/delay/-/delay-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-1.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1447388048608,"_cnpm_publish_time":1447388048608,"_hasShrinkwrap":false},"1.0.0":{"name":"delay","version":"1.0.0","description":"Delay a promise a specified amount of time","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/delay"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.12.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","resolve","delay","defer","wait","timeout","settimeout","event","loop","next","tick","delay","timeout"],"devDependencies":{"ava":"*","xo":"*"},"xo":{"ignores":["test.js"]},"gitHead":"01b4e21899bd8ef9d0a7d355b73c357f84b38f3a","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"homepage":"https://github.com/sindresorhus/delay","_id":"delay@1.0.0","_shasum":"3fcbeffb82b69b4097c8f83404d9dfe2f561d9aa","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"3fcbeffb82b69b4097c8f83404d9dfe2f561d9aa","size":1545,"noattachment":false,"key":"/delay/-/delay-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1447353413776,"_cnpm_publish_time":1447353413776,"_hasShrinkwrap":false},"0.0.1":{"name":"delay","description":"Delayed response connect middleware","version":"0.0.1","dependencies":{"pause":"0.0.1"},"_id":"delay@0.0.1","dist":{"shasum":"d0bfcc831ad8890c19912b72cd3c7bdc1cc7267f","size":541,"noattachment":false,"key":"/delay/-/delay-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/delay/download/delay-0.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1342721136578,"_cnpm_publish_time":1342721136578,"_hasShrinkwrap":false}},"readme":"# delay\n\n> Delay a promise a specified amount of time\n\n> [!TIP]\n> If you target Node.js only, you can use `import {setTimeout} from 'node:timers/promises'; await setTimeout(1000);` instead. This package can still be useful if you need browser support or the extra features.\n\n## Install\n\n```sh\nnpm install delay\n```\n\n## Usage\n\n```js\nimport delay from 'delay';\n\nbar();\n\nawait delay(100);\n\n// Executed 100 milliseconds later\nbaz();\n```\n\n## API\n\n### delay(milliseconds, options?) <sup>default import</sup>\n\nCreate a promise which resolves after the specified `milliseconds`.\n\n### rangeDelay(minimum, maximum, options?)\n\nCreate a promise which resolves after a random amount of milliseconds between `minimum` and `maximum` has passed.\n\nUseful for tests and web scraping since they can have unpredictable performance. For example, if you have a test that asserts a method should not take longer than a certain amount of time, and then run it on a CI, it could take longer. So with this method, you could give it a threshold instead.\n\n#### milliseconds\n#### mininum\n#### maximum\n\nType: `number`\n\nMilliseconds to delay the promise.\n\nUnlike native `setTimeout`, this supports unlimited delay length.\n\n#### options\n\nType: `object`\n\n##### value\n\nType: `unknown`\n\nA value to resolve in the returned promise.\n\n```js\nimport delay from 'delay';\n\nconst result = await delay(100, {value: '????'});\n\n// Executed after 100 milliseconds\nconsole.log(result);\n//=> '????'\n```\n\n##### signal\n\nType: [`AbortSignal`](https://developer.mozilla.org/docs/Web/API/AbortSignal)\n\nThe returned promise will be rejected with an `AbortError` if the signal is aborted.\n\n```js\nimport delay from 'delay';\n\nconst abortController = new AbortController();\n\nsetTimeout(() => {\n\tabortController.abort();\n}, 500);\n\ntry {\n\tawait delay(1000, {signal: abortController.signal});\n} catch (error) {\n\t// 500 milliseconds later\n\tconsole.log(error.name)\n\t//=> 'AbortError'\n}\n```\n\n### clearDelay(delayPromise)\n\nClears the delay and settles the promise.\n\nIf you pass in a promise that is already cleared or a promise coming from somewhere else, it does nothing.\n\n```js\nimport delay, {clearDelay} from 'delay';\n\nconst delayedPromise = delay(1000, {value: 'Done'});\n\nsetTimeout(() => {\n\tclearDelay(delayedPromise);\n}, 500);\n\n// 500 milliseconds later\nconsole.log(await delayedPromise);\n//=> 'Done'\n```\n\n### createDelay({clearTimeout, setTimeout})\n\nCreates a new `delay` instance using the provided functions for clearing and setting timeouts. Useful if you're about to stub timers globally, but you still want to use `delay` to manage your tests.\n\n```js\nimport {createDelay} from 'delay';\n\nconst customDelay = createDelay({clearTimeout, setTimeout});\n\nconst result = await customDelay(100, {value: '????'});\n\n// Executed after 100 milliseconds\nconsole.log(result);\n//=> '????'\n```\n\n## Related\n\n- [delay-cli](https://github.com/sindresorhus/delay-cli) - CLI for this module\n- [unlimited-timeout](https://github.com/sindresorhus/unlimited-timeout) - `setTimeout`/`setInterval` that works with delays longer than 24.8 days\n- [p-cancelable](https://github.com/sindresorhus/p-cancelable) - Create a promise that can be canceled\n- [p-min-delay](https://github.com/sindresorhus/p-min-delay) - Delay a promise a minimum amount of time\n- [p-immediate](https://github.com/sindresorhus/p-immediate) - Returns a promise resolved in the next event loop - think `setImmediate()`\n- [p-timeout](https://github.com/sindresorhus/p-timeout) - Timeout a promise after a specified amount of time\n- [More…](https://github.com/sindresorhus/promise-fun)\n","_attachments":{},"homepage":"https://github.com/sindresorhus/delay#readme","bugs":{"url":"https://github.com/sindresorhus/delay/issues"},"license":"MIT"}