{"_id":"@anio-js-foundation/run-fn-with-timeout","_rev":"1-c965a6a26ec2b47d37909db947ee0648","name":"@anio-js-foundation/run-fn-with-timeout","dist-tags":{"latest":"2.0.0"},"versions":{"2.0.0":{"name":"@anio-js-foundation/run-fn-with-timeout","version":"2.0.0","description":"Run a function with a timeout.","main":"./dist/package.mjs","author":{"name":"Anio Software","email":"info@anio.software"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/anio-js-foundation/run-fn-with-timeout.git"},"devDependencies":{"@anio-software/npm-package-bundler":"^1.0.0"},"scripts":{"prepare":"npm-package-bundler ."},"_id":"@anio-js-foundation/run-fn-with-timeout@2.0.0","gitHead":"988f1f74a4eeacbf8e619139f4e643750cb18aa9","bugs":{"url":"https://github.com/anio-js-foundation/run-fn-with-timeout/issues"},"homepage":"https://github.com/anio-js-foundation/run-fn-with-timeout#readme","_nodeVersion":"21.6.2","_npmVersion":"10.2.4","dist":{"integrity":"sha512-+iyg7Tl9GU/mVsoBQXT5m1/7l5jZYEb3mb/ZQH+WcZdkRiMHD83WBzguuq78FFWlvOvvde9Vld8jJwm4/i7pbw==","shasum":"53b56bd230c02f91dc8d84df9e143453a2a32ede","tarball":"https://registry.npmjs.org/@anio-js-foundation/run-fn-with-timeout/-/run-fn-with-timeout-2.0.0.tgz","fileCount":3,"unpackedSize":1493,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anio-js-foundation%2frun-fn-with-timeout@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6V771ZykKrAKWZwy4nEZGpfWoj5Y7pF2sBr0O44jmtgIgJi+HFe0VXyUJH49Z2IaC7nXb1zR2vSKs776mq7P8i3U="}]},"_npmUser":{"name":"dasdeo","email":"mark@anio.software"},"directories":{},"maintainers":[{"name":"dasdeo","email":"mark@anio.software"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/run-fn-with-timeout_2.0.0_1709515408186_0.5862894664612879"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-04T01:23:28.071Z","2.0.0":"2024-03-04T01:23:28.320Z","modified":"2024-03-13T13:16:05.026Z"},"maintainers":[{"email":"exory@anio.software","name":"exory2024"},{"email":"mark@anio.software","name":"dasdeo"}],"description":"Run a function with a timeout.","homepage":"https://github.com/anio-js-foundation/run-fn-with-timeout#readme","repository":{"type":"git","url":"git+https://github.com/anio-js-foundation/run-fn-with-timeout.git"},"author":{"name":"Anio Software","email":"info@anio.software"},"bugs":{"url":"https://github.com/anio-js-foundation/run-fn-with-timeout/issues"},"license":"MIT","readme":"# @anio-js-foundation/run-fn-with-timeout\n\nRun a function with a timeout.\n\n```js\nimport runFnWithTimeout from \"@anio-js-foundation/run-fn-with-timeout\"\n\nfunction myFunction() {\n\treturn new Promise(resolve => {\n\t\tsetTimeout(resolve, 500, \"hi\")\n\t})\n}\n\nconst result = await runFnWithTimeout(myFunction, 100)\n\n// prints { value: null, timeout: true }\nconsole.log(result)\n```\n","readmeFilename":"README.md"}