{"_id":"p-timeout","_rev":"4106771","name":"p-timeout","description":"Timeout a promise after a specified amount of time","dist-tags":{"latest":"7.0.1"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2026-01-11T18:56:30.000Z","created":"2016-10-21T06:53:31.308Z","7.0.1":"2025-10-07T01:46:05.476Z","7.0.0":"2025-09-15T11:10:06.716Z","6.1.4":"2025-01-01T13:07:05.386Z","6.1.3":"2024-10-17T04:46:53.949Z","6.1.2":"2023-06-12T18:41:51.967Z","6.1.1":"2023-02-12T06:51:45.268Z","6.1.0":"2023-01-23T11:12:11.814Z","6.0.0":"2022-07-25T16:31:05.037Z","5.1.0":"2022-05-26T17:26:42.627Z","5.0.2":"2021-10-23T14:01:24.635Z","5.0.1":"2021-10-08T06:18:34.740Z","5.0.0":"2021-04-06T17:39:14.332Z","4.1.0":"2020-12-26T12:18:19.029Z","4.0.1":"2020-12-06T09:13:05.972Z","4.0.0":"2020-12-01T15:56:35.402Z","3.2.0":"2019-09-17T15:10:47.564Z","3.1.0":"2019-04-04T04:59:54.875Z","3.0.0":"2019-03-12T08:24:38.809Z","2.0.1":"2017-11-28T20:06:42.140Z","2.0.0":"2017-11-19T09:37:35.081Z","1.2.1":"2017-11-19T09:31:50.913Z","1.2.0":"2017-07-02T09:24:45.926Z","1.1.1":"2017-05-14T15:03:26.207Z","1.1.0":"2017-05-14T15:00:07.134Z","1.0.0":"2016-10-21T06:53:31.308Z"},"users":{"sopepos":true,"rocket0191":true,"drewigg":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"versions":{"7.0.1":{"name":"p-timeout","version":"7.0.1","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.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 && ava && tsd"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"^6.4.1","delay":"^6.0.0","in-range":"^3.0.0","p-cancelable":"^4.0.1","sinon":"^21.0.0","time-span":"^5.1.0","tsd":"^0.33.0","xo":"^1.2.2"},"gitHead":"245066ef7daa5e74024d5b6a188ae599a1b7bfdf","types":"./index.d.ts","_id":"p-timeout@7.0.1","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_nodeVersion":"20.19.5","_npmVersion":"11.6.1","dist":{"shasum":"95680a6aa693c530f14ac337b8bd32d4ec6ae4f0","size":4454,"noattachment":false,"key":"/p-timeout/-/p-timeout-7.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-7.0.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/p-timeout_7.0.1_1759801565255_0.484806398102942"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-10-07T01:46:05.476Z","publish_time":1759801565476,"_source_registry_name":"default","_cnpm_publish_time":1759801565476},"7.0.0":{"name":"p-timeout","version":"7.0.0","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.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 && ava && tsd"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"^6.4.1","delay":"^6.0.0","in-range":"^3.0.0","p-cancelable":"^4.0.1","sinon":"^21.0.0","time-span":"^5.1.0","tsd":"^0.33.0","xo":"^1.2.2"},"_id":"p-timeout@7.0.0","gitHead":"f9ced5e18ad81eab24a9a8d0f07bf3002f7bea64","types":"./index.d.ts","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_nodeVersion":"20.19.1","_npmVersion":"10.9.2","dist":{"shasum":"7b59b0b519c592d8eda8c24ae0453e9236ddf60b","size":4403,"noattachment":false,"key":"/p-timeout/-/p-timeout-7.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-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/p-timeout_7.0.0_1757934606536_0.4576878844031398"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-09-15T11:10:06.716Z","publish_time":1757934606716,"_source_registry_name":"default","_cnpm_publish_time":1757934606716},"6.1.4":{"name":"p-timeout","version":"6.1.4","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","types":"./index.d.ts","sideEffects":false,"engines":{"node":">=14.16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"^4.3.1","delay":"^5.0.0","in-range":"^3.0.0","p-cancelable":"^4.0.1","sinon":"^19.0.2","time-span":"^5.1.0","tsd":"^0.22.0","xo":"^0.54.2"},"_id":"p-timeout@6.1.4","gitHead":"16b290ed4eed35f977537756411261f476623586","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_nodeVersion":"23.3.0","_npmVersion":"10.9.0","dist":{"shasum":"418e1f4dd833fa96a2e3f532547dd2abdb08dbc2","size":4534,"noattachment":false,"key":"/p-timeout/-/p-timeout-6.1.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-6.1.4.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/p-timeout_6.1.4_1735736825200_0.8845203635517245"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-01-01T13:07:05.386Z","publish_time":1735736825386,"_source_registry_name":"default","_cnpm_publish_time":1735736825386},"6.1.3":{"name":"p-timeout","version":"6.1.3","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","types":"./index.d.ts","sideEffects":false,"engines":{"node":">=14.16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"^4.3.1","delay":"^5.0.0","in-range":"^3.0.0","p-cancelable":"^4.0.1","sinon":"^19.0.2","time-span":"^5.1.0","tsd":"^0.22.0","xo":"^0.54.2"},"_id":"p-timeout@6.1.3","gitHead":"3cabb7a7e576b5acc344db7f55acf4d56e47400a","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_nodeVersion":"22.6.0","_npmVersion":"10.6.0","dist":{"shasum":"9635160c4e10c7b4c3db45b7d5d26f911d9fd853","size":4547,"noattachment":false,"key":"/p-timeout/-/p-timeout-6.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-6.1.3.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout_6.1.3_1729140413756_0.8433320036852854"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-10-17T04:46:53.949Z","publish_time":1729140413949,"_source_registry_name":"default","_cnpm_publish_time":1729140413949},"6.1.2":{"name":"p-timeout","version":"6.1.2","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","types":"./index.d.ts","engines":{"node":">=14.16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"^4.3.1","delay":"^5.0.0","in-range":"^3.0.0","p-cancelable":"^4.0.1","time-span":"^5.1.0","tsd":"^0.22.0","xo":"^0.54.2"},"gitHead":"6ddb49ed7dc75054d10f379b47e0121239cf3688","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@6.1.2","_nodeVersion":"16.20.0","_npmVersion":"9.2.0","dist":{"shasum":"22b8d8a78abf5e103030211c5fc6dee1166a6aa5","size":3903,"noattachment":false,"key":"/p-timeout/-/p-timeout-6.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-6.1.2.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout_6.1.2_1686595311744_0.07945358726269314"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-06-12T18:41:51.967Z","publish_time":1686595311967,"_source_registry_name":"default","_cnpm_publish_time":1686595311967},"6.1.1":{"name":"p-timeout","version":"6.1.1","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","types":"./index.d.ts","engines":{"node":">=14.16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"^4.3.1","delay":"^5.0.0","in-range":"^3.0.0","p-cancelable":"^4.0.1","time-span":"^5.1.0","tsd":"^0.22.0","xo":"^0.51.0"},"gitHead":"b91e04530da6858cba77c354ea9c8659c5140e59","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@6.1.1","_nodeVersion":"14.21.1","_npmVersion":"9.2.0","dist":{"shasum":"bcee5e37d730f5474d973b6ff226751a1a5e6ff1","size":3888,"noattachment":false,"key":"/p-timeout/-/p-timeout-6.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-6.1.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout_6.1.1_1676184705092_0.8550612448400001"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-02-12T06:51:45.268Z","publish_time":1676184705268,"_cnpm_publish_time":1676184705268},"6.1.0":{"name":"p-timeout","version":"6.1.0","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","types":"./index.d.ts","engines":{"node":">=14.16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"^4.3.1","delay":"^5.0.0","in-range":"^3.0.0","p-cancelable":"^4.0.1","time-span":"^5.1.0","tsd":"^0.22.0","xo":"^0.51.0"},"gitHead":"fdc74e480397b59040ea0ef8b142da114b57bbdd","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@6.1.0","_nodeVersion":"14.21.1","_npmVersion":"9.2.0","dist":{"shasum":"6de0814929e4362e6e8526f21dd9c2e70ad35f1c","size":3828,"noattachment":false,"key":"/p-timeout/-/p-timeout-6.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-6.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout_6.1.0_1674472331651_0.8041705037627156"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-23T11:12:11.814Z","publish_time":1674472331814,"_cnpm_publish_time":1674472331814},"6.0.0":{"name":"p-timeout","version":"6.0.0","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","types":"./index.d.ts","engines":{"node":">=14.16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"^4.3.1","delay":"^5.0.0","in-range":"^3.0.0","p-cancelable":"^4.0.1","time-span":"^5.1.0","tsd":"^0.22.0","xo":"^0.51.0"},"gitHead":"46acd4b51111c4113d5f4a7aa9a729eee883c367","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@6.0.0","_nodeVersion":"14.19.3","_npmVersion":"8.3.2","dist":{"shasum":"84c210f5500da1af4c31ab2768d794e5e081dd91","size":3637,"noattachment":false,"key":"/p-timeout/-/p-timeout-6.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-6.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout_6.0.0_1658766664863_0.8877956378366978"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-07-25T16:31:10.702Z","publish_time":1658766665037,"_cnpm_publish_time":1658766665037},"5.1.0":{"name":"p-timeout","version":"5.1.0","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"^3.15.0","delay":"^5.0.0","in-range":"^3.0.0","p-cancelable":"^2.1.0","time-span":"^4.0.0","tsd":"^0.14.0","xo":"^0.38.2"},"types":"./index.d.ts","gitHead":"56e22052c6e59eb694fcc90020fe8f5124818327","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@5.1.0","_nodeVersion":"16.15.0","_npmVersion":"8.3.2","dist":{"shasum":"b3c691cf4415138ce2d9cfe071dba11f0fee085b","size":3637,"noattachment":false,"key":"/p-timeout/-/p-timeout-5.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-5.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout_5.1.0_1653586002488_0.7270644693104262"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-05-26T17:26:50.327Z","publish_time":1653586002627,"_cnpm_publish_time":1653586002627},"5.0.2":{"name":"p-timeout","version":"5.0.2","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"^3.15.0","delay":"^5.0.0","in-range":"^3.0.0","p-cancelable":"^2.1.0","time-span":"^4.0.0","tsd":"^0.14.0","xo":"^0.38.2"},"gitHead":"0c28612eaefffd76453244e7f6c5ddafcd5d92e1","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@5.0.2","_nodeVersion":"16.10.0","_npmVersion":"7.20.3","dist":{"shasum":"d12964c4b2f988e15f72b455c2c428d82a0ec0a0","size":3093,"noattachment":false,"key":"/p-timeout/-/p-timeout-5.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-5.0.2.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout_5.0.2_1634997684443_0.13615090779336492"},"_hasShrinkwrap":false,"publish_time":1634997684635,"_cnpm_publish_time":1634997684635},"5.0.1":{"name":"p-timeout","version":"5.0.1","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"^3.15.0","delay":"^5.0.0","in-range":"^3.0.0","p-cancelable":"^2.1.0","time-span":"^4.0.0","tsd":"^0.14.0","xo":"^0.38.2"},"gitHead":"7dd311757e45dbd9a3c7af6fd7216d3b42473d6b","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@5.0.1","_nodeVersion":"16.10.0","_npmVersion":"7.20.3","dist":{"shasum":"c866f365252bb507fdb74b6b016c730c6cff04a0","size":3082,"noattachment":false,"key":"/p-timeout/-/p-timeout-5.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-5.0.1.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout_5.0.1_1633673914605_0.21758168673303424"},"_hasShrinkwrap":false,"publish_time":1633673914740,"_cnpm_publish_time":1633673914740},"5.0.0":{"name":"p-timeout","version":"5.0.0","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"^3.15.0","delay":"^5.0.0","in-range":"^3.0.0","p-cancelable":"^2.1.0","time-span":"^4.0.0","tsd":"^0.14.0","xo":"^0.38.2"},"gitHead":"d43bbc158912877c6e50e4e72dc72cc4435feed3","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@5.0.0","_nodeVersion":"12.20.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"0f5dc08422e7243f8317669c461734cd1257a8dc","size":3086,"noattachment":false,"key":"/p-timeout/-/p-timeout-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-5.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout_5.0.0_1617730754172_0.28824924011491393"},"_hasShrinkwrap":false,"publish_time":1617730754332,"_cnpm_publish_time":1617730754332},"4.1.0":{"name":"p-timeout","version":"4.1.0","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"^2.4.0","delay":"^4.4.0","p-cancelable":"^2.0.0","tsd":"^0.13.1","xo":"^0.35.0","in-range":"^2.0.0","time-span":"^4.0.0"},"gitHead":"4f86930f75d1565927790ab70b4ac643e47007fc","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@4.1.0","_nodeVersion":"10.22.0","_npmVersion":"6.14.9","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"788253c0452ab0ffecf18a62dff94ff1bd09ca0a","size":3206,"noattachment":false,"key":"/p-timeout/-/p-timeout-4.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-4.1.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout_4.1.0_1608985098916_0.3466769230430735"},"_hasShrinkwrap":false,"publish_time":1608985099029,"_cnpm_publish_time":1608985099029},"4.0.1":{"name":"p-timeout","version":"4.0.1","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"^2.4.0","delay":"^4.4.0","p-cancelable":"^2.0.0","tsd":"^0.13.1","xo":"^0.35.0"},"gitHead":"46c25acfc59ce894dd732f1d278377e13f6a24f8","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@4.0.1","_nodeVersion":"10.22.1","_npmVersion":"6.14.9","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"a4c1d33f50fcae3a302e9a37c980ad360f3163ab","size":3084,"noattachment":false,"key":"/p-timeout/-/p-timeout-4.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-4.0.1.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout_4.0.1_1607245985854_0.21095119171588395"},"_hasShrinkwrap":false,"publish_time":1607245985972,"_cnpm_publish_time":1607245985972},"4.0.0":{"name":"p-timeout","version":"4.0.0","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"^2.4.0","delay":"^4.4.0","p-cancelable":"^2.0.0","tsd":"^0.13.1","xo":"^0.35.0"},"gitHead":"bddde181244d185bbf218a5dc18463ded619734d","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@4.0.0","_nodeVersion":"10.22.1","_npmVersion":"6.14.9","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"4a4ec6a8cc0d5f02db4a6462ac1c14db1e8f8c32","size":3072,"noattachment":false,"key":"/p-timeout/-/p-timeout-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-4.0.0.tgz"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout_4.0.0_1606838195237_0.8859125444067344"},"_hasShrinkwrap":false,"publish_time":1606838195402,"_cnpm_publish_time":1606838195402},"3.2.0":{"name":"p-timeout","version":"3.2.0","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"p-finally":"^1.0.0"},"devDependencies":{"ava":"^1.4.1","delay":"^4.1.0","p-cancelable":"^2.0.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"dececa8aa3d377d92d0abd64ea46d0f7efcd0688","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@3.2.0","_nodeVersion":"12.10.0","_npmVersion":"6.11.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"c7e17abc971d2a7962ef83626b35d635acf23dfe","size":2768,"noattachment":false,"key":"/p-timeout/-/p-timeout-3.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-3.2.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout_3.2.0_1568733047356_0.1151583602740891"},"_hasShrinkwrap":false,"publish_time":1568733047564,"_cnpm_publish_time":1568733047564},"3.1.0":{"name":"p-timeout","version":"3.1.0","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"p-finally":"^1.0.0"},"devDependencies":{"ava":"^1.4.1","delay":"^4.1.0","p-cancelable":"^2.0.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"21cf551a93359b2f84448838a943c4ca77f7c1a3","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@3.1.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"198c1f503bb973e9b9727177a276c80afd6851f3","size":2724,"noattachment":false,"key":"/p-timeout/-/p-timeout-3.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-3.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout_3.1.0_1554353994685_0.9872192550898578"},"_hasShrinkwrap":false,"publish_time":1554353994875,"_cnpm_publish_time":1554353994875},"3.0.0":{"name":"p-timeout","version":"3.0.0","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd-check"},"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"p-finally":"^1.0.0"},"devDependencies":{"ava":"^1.3.1","delay":"^4.1.0","p-cancelable":"^1.1.0","tsd-check":"^0.3.0","xo":"^0.24.0"},"gitHead":"c79394a096b1707c21597cdef09e5695883bc42c","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@3.0.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"1bbd42db28c669efd02e1a82ccf14dc59eb57ed1","size":2659,"noattachment":false,"key":"/p-timeout/-/p-timeout-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout_3.0.0_1552379078684_0.7364890382738132"},"_hasShrinkwrap":false,"publish_time":1552379078809,"_cnpm_publish_time":1552379078809},"2.0.1":{"name":"p-timeout","version":"2.0.1","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"p-finally":"^1.0.0"},"devDependencies":{"ava":"*","delay":"^2.0.0","p-cancelable":"^0.3.0","xo":"*"},"gitHead":"db65c4b51196c505ac005ce5b665d41a246ed253","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@2.0.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"d8dd1979595d2dc0139e1fe46b8b646cb3cdf038","size":2271,"noattachment":false,"key":"/p-timeout/-/p-timeout-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-2.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout-2.0.1.tgz_1511899601223_0.9610305042006075"},"directories":{},"publish_time":1511899602140,"_hasShrinkwrap":false,"_cnpm_publish_time":1511899602140},"2.0.0":{"name":"p-timeout","version":"2.0.0","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"p-finally":"^1.0.0"},"devDependencies":{"ava":"*","delay":"^2.0.0","p-cancelable":"^0.3.0","xo":"*"},"gitHead":"63a486a0f23fa738959bd81436fc4e984df53d02","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@2.0.0","_shasum":"c0c5888560ffba5257307eb0d233de334739f1c9","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"c0c5888560ffba5257307eb0d233de334739f1c9","size":2251,"noattachment":false,"key":"/p-timeout/-/p-timeout-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout-2.0.0.tgz_1511084254929_0.9350353665649891"},"directories":{},"publish_time":1511084255081,"_hasShrinkwrap":false,"_cnpm_publish_time":1511084255081},"1.2.1":{"name":"p-timeout","version":"1.2.1","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"p-finally":"^1.0.0"},"devDependencies":{"ava":"*","delay":"^2.0.0","xo":"*"},"gitHead":"14d97b13fd8e35442cec2ad1f8a4623bf92b338e","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@1.2.1","_shasum":"5eb3b353b7fce99f101a1038880bb054ebbea386","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"5eb3b353b7fce99f101a1038880bb054ebbea386","size":2173,"noattachment":false,"key":"/p-timeout/-/p-timeout-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-1.2.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout-1.2.1.tgz_1511083910849_0.16874366137199104"},"directories":{},"publish_time":1511083910913,"_hasShrinkwrap":false,"_cnpm_publish_time":1511083910913},"1.2.0":{"name":"p-timeout","version":"1.2.0","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"dependencies":{"p-finally":"^1.0.0"},"devDependencies":{"ava":"*","delay":"^2.0.0","xo":"*"},"gitHead":"339b0ac5dbf9ff69d5bc23a2da2524d304561e4a","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@1.2.0","_shasum":"9820f99434c5817868b4f34809ee5291660d5b6c","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"9820f99434c5817868b4f34809ee5291660d5b6c","size":2171,"noattachment":false,"key":"/p-timeout/-/p-timeout-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-1.2.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/p-timeout-1.2.0.tgz_1498987484998_0.3521558423526585"},"directories":{},"publish_time":1498987485926,"_hasShrinkwrap":false,"_cnpm_publish_time":1498987485926},"1.1.1":{"name":"p-timeout","version":"1.1.1","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"*","delay":"^1.3.1","xo":"*"},"xo":{"esnext":true},"gitHead":"7bb7ff2be0f60ad1be95aa27f0151454cb47f3d6","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@1.1.1","_shasum":"d28e9fdf96e328886fbff078f886ad158c53bf6d","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"d28e9fdf96e328886fbff078f886ad158c53bf6d","size":2194,"noattachment":false,"key":"/p-timeout/-/p-timeout-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-1.1.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/p-timeout-1.1.1.tgz_1494774205957_0.14603510382585227"},"directories":{},"publish_time":1494774206207,"_hasShrinkwrap":false,"_cnpm_publish_time":1494774206207},"1.1.0":{"name":"p-timeout","version":"1.1.0","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"*","delay":"^1.3.1","xo":"*"},"xo":{"esnext":true},"gitHead":"fd9ac502ab6576eaada337aa3ca8a7b2a069cb7c","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@1.1.0","_shasum":"61b28e50a9a349b6c79e96f03553316b208919b4","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"61b28e50a9a349b6c79e96f03553316b208919b4","size":2182,"noattachment":false,"key":"/p-timeout/-/p-timeout-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-1.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/p-timeout-1.1.0.tgz_1494774004520_0.2756209021899849"},"directories":{},"publish_time":1494774007134,"_hasShrinkwrap":false,"_cnpm_publish_time":1494774007134},"1.0.0":{"name":"p-timeout","version":"1.0.0","description":"Timeout a promise after a specified amount of time","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/p-timeout.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["promise","timeout","error","invalidate","async","await","promises","time","out","cancel","bluebird"],"devDependencies":{"ava":"*","delay":"^1.3.1","xo":"*"},"xo":{"esnext":true},"gitHead":"7443c42ee39c8e8193c16aa7d0a6b17eb1324b88","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"homepage":"https://github.com/sindresorhus/p-timeout#readme","_id":"p-timeout@1.0.0","_shasum":"eaeceacc0b7910610175348de2b081615d8a77d9","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.6.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"eaeceacc0b7910610175348de2b081615d8a77d9","size":2174,"noattachment":false,"key":"/p-timeout/-/p-timeout-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/p-timeout/download/p-timeout-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/p-timeout-1.0.0.tgz_1477032811087_0.24474634905345738"},"directories":{},"publish_time":1477032811308,"_cnpm_publish_time":1477032811308,"_hasShrinkwrap":false}},"readme":"# p-timeout\n\n> Timeout a promise after a specified amount of time\n\n> [!NOTE]\n> You may want to use `AbortSignal.timeout()` instead. [Learn more.](#abortsignal)\n\n## Install\n\n```sh\nnpm install p-timeout\n```\n\n## Usage\n\n```js\nimport {setTimeout} from 'node:timers/promises';\nimport pTimeout from 'p-timeout';\n\nconst delayedPromise = setTimeout(200);\n\nawait pTimeout(delayedPromise, {\n\tmilliseconds: 50,\n});\n//=> [TimeoutError: Promise timed out after 50 milliseconds]\n```\n\n## API\n\n### pTimeout(input, options)\n\nReturns a decorated `input` that times out after `milliseconds` time. It has a `.clear()` method that clears the timeout.\n\nIf you pass in a cancelable promise, specifically a promise with a `.cancel()` method, that method will be called when the `pTimeout` promise times out.\n\n#### input\n\nType: `Promise`\n\nPromise to decorate.\n\n#### options\n\nType: `object`\n\n##### milliseconds\n\nType: `number`\n\nMilliseconds before timing out.\n\nPassing `Infinity` will cause it to never time out.\n\n##### message\n\nType: `string | Error | false`\\\nDefault: `'Promise timed out after {milliseconds} milliseconds'`\n\nSpecify a custom error message or error to throw when it times out:\n\n- `message: 'too slow'` will throw `TimeoutError('too slow')`\n- `message: new MyCustomError('it’s over 9000')` will throw the same error instance\n- `message: false` will make the promise resolve with `undefined` instead of rejecting\n\nIf you do a custom error, it's recommended to sub-class `TimeoutError`:\n\n```js\nimport {TimeoutError} from 'p-timeout';\n\nclass MyCustomError extends TimeoutError {\n\tname = \"MyCustomError\";\n}\n```\n\n##### fallback\n\nType: `Function`\n\nDo something other than rejecting with an error on timeout.\n\nThe function can return a value or a promise.\n\nYou could for example retry:\n\n```js\nimport {setTimeout} from 'node:timers/promises';\nimport pTimeout from 'p-timeout';\n\nconst delayedPromise = () => setTimeout(200);\n\nawait pTimeout(delayedPromise(), {\n\tmilliseconds: 50,\n\tfallback: () => {\n\t\treturn pTimeout(delayedPromise(), {\n\t\t\tmilliseconds: 300\n\t\t});\n\t}\n});\n```\n\n##### customTimers\n\nType: `object` with function properties `setTimeout` and `clearTimeout`\n\nCustom implementations for the `setTimeout` and `clearTimeout` functions.\n\nUseful for testing purposes, in particular to work around [`sinon.useFakeTimers()`](https://sinonjs.org/releases/latest/fake-timers/).\n\nExample:\n\n```js\nimport pTimeout from 'p-timeout';\nimport sinon from 'sinon';\n\nconst originalSetTimeout = setTimeout;\nconst originalClearTimeout = clearTimeout;\n\nsinon.useFakeTimers();\n\n// Use `pTimeout` without being affected by `sinon.useFakeTimers()`:\nawait pTimeout(doSomething(), {\n\tmilliseconds: 2000,\n\tcustomTimers: {\n\t\tsetTimeout: originalSetTimeout,\n\t\tclearTimeout: originalClearTimeout\n\t}\n});\n```\n\n##### signal\n\nType: [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)\n\nAbort the promise.\n\n```js\nimport pTimeout from 'p-timeout';\nimport delay from 'delay';\n\nconst delayedPromise = delay(3000);\n\nconst abortController = new AbortController();\n\nsetTimeout(() => {\n\tabortController.abort();\n}, 100);\n\nawait pTimeout(delayedPromise, {\n\tmilliseconds: 2000,\n\tsignal: abortController.signal\n});\n```\n\n### TimeoutError\n\nExposed for instance checking and sub-classing.\n\n## Related\n\n- [delay](https://github.com/sindresorhus/delay) - Delay a promise a specified amount of time\n- [p-min-delay](https://github.com/sindresorhus/p-min-delay) - Delay a promise a minimum amount of time\n- [p-retry](https://github.com/sindresorhus/p-retry) - Retry a promise-returning function\n- [More…](https://github.com/sindresorhus/promise-fun)\n\n## AbortSignal\n\n> Modern alternative to `p-timeout`\n\nAsync functions like `fetch` can accept an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal), which can be conveniently created with [`AbortSignal.timeout()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/timeout_static).\n\nThe advantage over `p-timeout` is that the promise-generating function (like `fetch`) is actually notified that the user is no longer expecting an answer, so it can interrupt its work and free resources.\n\n```js\n// Call API, timeout after 5 seconds\nconst response = await fetch('./my-api', {signal: AbortSignal.timeout(5000)});\n```\n\n```js\nasync function buildWall(signal) {\n\tfor (const brick of bricks) {\n\t\tsignal.throwIfAborted();\n\t\t// Or: if (signal.aborted) { return; }\n\n\t\tawait layBrick();\n\t}\n}\n\n// Stop long work after 60 seconds\nawait buildWall(AbortSignal.timeout(60_000))\n```\n\nYou can also combine multiple signals, like when you have a timeout *and* an `AbortController` triggered with a “Cancel” button click. You can use the upcoming [`AbortSignal.any()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/any_static) helper or [`abort-utils`](https://github.com/fregante/abort-utils/blob/main/source/merge-signals.md).\n","_attachments":{},"homepage":"https://github.com/sindresorhus/p-timeout#readme","bugs":{"url":"https://github.com/sindresorhus/p-timeout/issues"},"license":"MIT"}