{"_rev":"12-d81c3c1148ae9955636ac80724a4374f","time":{"created":"2023-07-28T16:19:31.763Z","1.0.0":"2023-07-28T07:09:56.995Z","modified":"2023-07-28T16:19:32.118Z","1.0.1":"2023-07-28T07:16:54.114Z","1.0.2":"2023-07-28T08:11:22.283Z","1.0.3":"2023-07-28T13:56:52.988Z","1.1.0":"2023-07-28T16:19:31.981Z"},"_id":"@arndesk/awaitdelay","name":"@arndesk/awaitdelay","dist-tags":{"latest":"1.1.0"},"versions":{"1.1.0":{"name":"@arndesk/awaitdelay","version":"1.1.0","description":"A Node Js utility to add timeouts to promises","main":"index.js","types":"index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/arndesk/awaitdelay.git"},"engines":{"node":">=8"},"keywords":["promise","timeout","error","async","await","promises","time","out","promise timeout","await timeout"],"author":{"name":"Arnob Arjun","email":"mauraiz55@gmail.com"},"license":"MIT","homepage":"https://github.com/arndesk/awaitdelay#readme","_id":"@arndesk/awaitdelay@1.1.0","gitHead":"8ba67616b24091363b5e2fe124bac3395ef5f71b","bugs":{"url":"https://github.com/arndesk/awaitdelay/issues"},"_nodeVersion":"18.16.0","_npmVersion":"9.8.0","dist":{"integrity":"sha512-Ri4+bMYrVnug0ThN63VvLIT+HN+WMkfHLjJs4L8TK5NJjKYm/YVT8nqXZlL9MhqYGBGtr/1GIbfLg5DIhhprNg==","shasum":"fbb45db149d84da2e281c35d0583d7f08ae8c31f","tarball":"https://registry.npmjs.org/@arndesk/awaitdelay/-/awaitdelay-1.1.0.tgz","fileCount":5,"unpackedSize":4430,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3eMW3Xb6yk0NDZGpLT3TM818VY19f5dQozLE3kpSGQwIhAMDl2Ica6ABgdImtFP2+6l+Idwt+6sHDBc7Wn5haOn0H"}]},"_npmUser":{"name":"arndesk","email":"arndesk1@gmail.com"},"directories":{},"maintainers":[{"name":"arndesk","email":"arndesk1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/awaitdelay_1.1.0_1690561171835_0.5183409129445335"},"_hasShrinkwrap":false}},"maintainers":[{"name":"arndesk","email":"arndesk1@gmail.com"}],"description":"A Node Js utility to add timeouts to promises","homepage":"https://github.com/arndesk/awaitdelay#readme","keywords":["promise","timeout","error","async","await","promises","time","out","promise timeout","await timeout"],"repository":{"type":"git","url":"git+https://github.com/arndesk/awaitdelay.git"},"author":{"name":"Arnob Arjun","email":"mauraiz55@gmail.com"},"bugs":{"url":"https://github.com/arndesk/awaitdelay/issues"},"license":"MIT","readme":"<br />\n\n<h1 align=\"center\">@arndesk/awaitdelay</h1>\n<h4 align=\"center\">A Node Js utility to add timeouts to promises</h4>\n\n<p align=\"center\">\n  <a href=\"#get-started\">Get Started</a> &bull;\n  <a href=\"#installation\">Installation</a> &bull;\n  <a href=\"#usage\">Usage</a> &bull;\n  <a href=\"#features\">Features</a> &bull;\n  <a href=\"#contributing\">Contributing</a> &bull;\n  <a href=\"#license\">License</a>\n</p>\n\n<h2 id=\"get-started\">Get Started</h2>\n\n<h3 id=\"installation\">Installation</h3>\n\n<p>Use <code>npm</code> to install this package:</p>\n\n<pre>\n<code>npm install @arndesk/awaitdelay</code>\n</pre>\n\n<h3 id=\"usage\">Usage</h3>\n\n<p>Here's a basic example of how to use awaitdelay in your code:</p>\n\n<pre>\n<code>\n// ES Modules import\nimport awaitdelay from '@arndesk/awaitdelay';\n// CommonJS require\nconst awaitdelay = require('@arndesk/awaitdelay');\n\n// Async function to use the awaitdelay function\nasync function main() {\n  const slowPromise = new Promise(resolve => setTimeout(() => resolve('Resolved'), 5000));\n\n  try {\n    const result = await awaitdelay(slowPromise, { timeout: 5000 }); // 5 seconds timeout\n    console.log(result);\n  } catch (error) {\n    console.error(error.message);\n  }\n}\n\nmain();\n</code>\n</pre>\n\n<h2 id=\"features\">Features</h2>\n\n<ul>\n  <li>Provides a straightforward way to add timeouts to promises</li>\n  <li>Easily adjustable timeout duration</li>\n  <li>Compatible with both ES Modules and CommonJS</li>\n  <li>Useful in a wide range of JavaScript and TypeScript projects</li>\n</ul>\n\n","readmeFilename":"README.md"}