{"_id":"retimeable-signal","_rev":"2-5350bf549aa94ac05fb47e84465bb2e8","name":"retimeable-signal","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.0":{"name":"retimeable-signal","version":"0.0.0","author":{"name":"Alex Potsides","email":"alex@achingbrain.net"},"license":"Apache-2.0 OR MIT","_id":"retimeable-signal@0.0.0","maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"homepage":"https://github.com/achingbrain/retimeable-signal#readme","bugs":{"url":"https://github.com/achingbrain/retimeable-signal/issues"},"dist":{"shasum":"5a7f08153205b77404c50b3ca121dec2d6e4927f","tarball":"https://registry.npmjs.org/retimeable-signal/-/retimeable-signal-0.0.0.tgz","fileCount":10,"integrity":"sha512-jxnBbSwD7khkZIf0cnD6j3BVawwhrbcT4y1WWWZq14l5Ds+z+csataLeBSRtKVqn5tjuT4WPCbMDJLKI2C/WUA==","signatures":[{"sig":"MEQCIEcG4nG5i5mRojylioHANfStHa22tSEQQi1dITIQcdKFAiAWsgJFScmaSQ4DONXg8vCFvSaEV5XFoeSUil/42+5nUQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17553},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"release":{"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"release":"major","breaking":true},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"],"branches":["main"]},"scripts":{"docs":"aegir docs","lint":"aegir lint","test":"aegir test","build":"aegir build","clean":"aegir clean","release":"aegir release","dep-check":"aegir dep-check","test:node":"aegir test -t node --cov","test:chrome":"aegir test -t browser --cov","test:firefox":"aegir test -t browser -- --browser firefox","test:chrome-webworker":"aegir test -t webworker","test:firefox-webworker":"aegir test -t webworker -- --browser firefox"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"repository":{"url":"git+https://github.com/achingbrain/retimeable-signal.git","type":"git"},"_npmVersion":"10.5.0","description":"An AbortSignal that fires on a resetable timeout","directories":{},"_nodeVersion":"20.12.2","eslintConfig":{"extends":"ipfs","parserOptions":{"project":true,"sourceType":"module"}},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"aegir":"^44.1.0","delay":"^6.0.0","p-event":"^6.0.1"},"_npmOperationalInternal":{"tmp":"tmp/retimeable-signal_0.0.0_1728644262229_0.22984212575091578","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"retimeable-signal","version":"1.0.0","author":{"name":"Alex Potsides","email":"alex@achingbrain.net"},"license":"Apache-2.0 OR MIT","_id":"retimeable-signal@1.0.0","maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"homepage":"https://github.com/achingbrain/retimeable-signal#readme","bugs":{"url":"https://github.com/achingbrain/retimeable-signal/issues"},"dist":{"shasum":"96119aa205e61502caf444f3aa8d3a58150c5542","tarball":"https://registry.npmjs.org/retimeable-signal/-/retimeable-signal-1.0.0.tgz","fileCount":10,"integrity":"sha512-WkanBjlv3cmXdc15uo8eyPV5bXuy6lLCde4dT3Ip3iQLLYk2NaizWTjRrT0yRU0Tq2z1twoqP42OQwTf0ndocQ==","signatures":[{"sig":"MEYCIQDLsAnIFg38dSwp/vxWXotT8BSHY2SLaSg3NABXs5nphQIhAMWmle/ogFtYf/lll0TLnv3BDaTAT+xWEdzHGS1/xpvQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/retimeable-signal@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":17577},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"gitHead":"fa0877da71f0c76f109b24a8f8a2ecc19cb268c2","release":{"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"release":"major","breaking":true},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"],"branches":["main"]},"scripts":{"docs":"aegir docs","lint":"aegir lint","test":"aegir test","build":"aegir build","clean":"aegir clean","release":"aegir release","dep-check":"aegir dep-check","test:node":"aegir test -t node --cov","test:chrome":"aegir test -t browser --cov","test:firefox":"aegir test -t browser -- --browser firefox","test:chrome-webworker":"aegir test -t webworker","test:firefox-webworker":"aegir test -t webworker -- --browser firefox"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"repository":{"url":"git+https://github.com/achingbrain/retimeable-signal.git","type":"git"},"_npmVersion":"10.9.0","description":"An AbortSignal that fires on a resetable timeout","directories":{},"_nodeVersion":"20.17.0","eslintConfig":{"extends":"ipfs","parserOptions":{"project":true,"sourceType":"module"}},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"aegir":"^44.1.0","delay":"^6.0.0","p-event":"^6.0.1"},"_npmOperationalInternal":{"tmp":"tmp/retimeable-signal_1.0.0_1728644735530_0.9563696155562298","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"retimeable-signal","version":"1.0.1","description":"An AbortSignal that fires on a resetable timeout","author":{"name":"Alex Potsides","email":"alex@achingbrain.net"},"license":"Apache-2.0 OR MIT","homepage":"https://github.com/achingbrain/retimeable-signal#readme","repository":{"type":"git","url":"git+https://github.com/achingbrain/retimeable-signal.git"},"bugs":{"url":"https://github.com/achingbrain/retimeable-signal/issues"},"publishConfig":{"access":"public","provenance":true},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"eslintConfig":{"extends":"ipfs","parserOptions":{"project":true,"sourceType":"module"}},"release":{"branches":["main"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github","@semantic-release/git"]},"scripts":{"clean":"aegir clean","lint":"aegir lint","build":"aegir build","test":"aegir test","test:node":"aegir test -t node --cov","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","release":"aegir release","dep-check":"aegir dep-check","docs":"aegir docs"},"devDependencies":{"aegir":"^45.0.7","delay":"^6.0.0","p-event":"^6.0.1"},"_id":"retimeable-signal@1.0.1","gitHead":"7a2ba5e6c97d2ae9bf8126b940b9525e08ecf065","_nodeVersion":"22.11.0","_npmVersion":"10.9.1","dist":{"integrity":"sha512-Cy26CYfbWnYu8HMoJeDhaMpW/EYFIbne3vMf6G9RSrOyWYXbPehja/BEdzpqmM84uy2bfBD7NPZhoQ4GZEtgvg==","shasum":"4df862708bd99a222655265358adc2698cdcbece","tarball":"https://registry.npmjs.org/retimeable-signal/-/retimeable-signal-1.0.1.tgz","fileCount":10,"unpackedSize":17577,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/retimeable-signal@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgaUockNe25dY4/v/MhzSNJBoSV7J6I1JbHtIVZI0KngIgUWUXSaBsR7xrWmMdqSo4+pPL+CBO/i/pptKRiF2gzJY="}]},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/retimeable-signal_1.0.1_1732806419179_0.48208764237132984"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-11T10:57:42.116Z","modified":"2024-11-28T15:06:59.697Z","0.0.0":"2024-10-11T10:57:42.387Z","1.0.0":"2024-10-11T11:05:35.694Z","1.0.1":"2024-11-28T15:06:59.338Z"},"bugs":{"url":"https://github.com/achingbrain/retimeable-signal/issues"},"author":{"name":"Alex Potsides","email":"alex@achingbrain.net"},"license":"Apache-2.0 OR MIT","homepage":"https://github.com/achingbrain/retimeable-signal#readme","repository":{"type":"git","url":"git+https://github.com/achingbrain/retimeable-signal.git"},"description":"An AbortSignal that fires on a resetable timeout","maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"readme":"# retimeable-signal\n\n[![codecov](https://img.shields.io/codecov/c/github/achingbrain/retimeable-signal.svg?style=flat-square)](https://codecov.io/gh/achingbrain/retimeable-signal)\n[![CI](https://img.shields.io/github/actions/workflow/status/achingbrain/retimeable-signal/js-test-and-release.yml?branch=main\\&style=flat-square)](https://github.com/achingbrain/retimeable-signal/actions/workflows/js-test-and-release.yml?query=branch%3Amain)\n\n> An AbortSignal that fires on a resetable timeout\n\n# About\n\n<!--\n\n!IMPORTANT!\n\nEverything in this README between \"# About\" and \"# Install\" is automatically\ngenerated and will be overwritten the next time the doc generator is run.\n\nTo make changes to this section, please update the @packageDocumentation section\nof src/index.js or src/index.ts\n\nTo experiment with formatting, please run \"npm run docs\" from the root of this\nrepo and examine the changes made.\n\n-->\n\nThis module exports a `retimeableSignal` function that returns an\n`AbortSignal` that fires an \"abort\" event after a specified number of ms.\n\nIt has been augmented with two additional methods `reset` and `clear` which\nchange the timeout time and prevent it from firing entirely.\n\n## Example\n\n```TypeScript\nimport { retimeableSignal } from 'retimeable-signal'\n\nconst signal = retimeableSignal(100)\n\n//... time passes, reset timeout to now + 100ms\nsignal.reset(100)\n\n// stop the signal from aborting at all\nsignal.clear()\n```\n\n## Prior art\n\nThis is module is inspired by the [retimer](https://www.npmjs.com/package/retimer)\nmodule except that uses `setTimeout` which can cause a Node.js process to\nstay open, this uses `AbortSignal.timeout` which does not.\n\n# Install\n\n```console\n$ npm i retimeable-signal\n```\n\n## Browser `<script>` tag\n\nLoading this module through a script tag will make its exports available as `RetimeableSignal` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/retimeable-signal/dist/index.min.js\"></script>\n```\n\n# API Docs\n\n- <https://achingbrain.github.io/retimeable-signal>\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](https://github.com/achingbrain/retimeable-signal/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](https://github.com/achingbrain/retimeable-signal/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n# Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","readmeFilename":"README.md"}