{"name":"aborter","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/aborter.git"},"description":"A minimal reimplementation of AbortController and AbortSignal.","license":"MIT","version":"3.0.1","type":"module","main":"dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"clean":"tsex clean","compile":"tsex compile","compile:watch":"tsex compile --watch","test":"tsex test","test:watch":"tsex test --watch","prepublishOnly":"tsex prepare"},"keywords":["abort","aborter","controller","signal","tiny","small"],"devDependencies":{"fava":"^0.3.4","tsex":"^4.0.2","typescript":"^5.7.3"},"_id":"aborter@3.0.1","gitHead":"90466920d3c2d37968e894cb4bd0a1441af60878","bugs":{"url":"https://github.com/fabiospampinato/aborter/issues"},"homepage":"https://github.com/fabiospampinato/aborter#readme","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-GlH9u1+xn00ctjb9o47ClmPPIzx7Qvy7cF43M+lRWv8/QyBo/ZudFNXxxkRKMHxvaMzO0krVq0UTgIrqpnCr3w==","shasum":"8c6b17868e50993198dcc74902d6800f89d783f9","tarball":"http://registry-npm.ywwl.com/aborter/download/aborter-3.0.1.tgz","fileCount":11,"unpackedSize":4458,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClDJtre9Ndni3KsDaHCbAp7NE5qhNNS2lPyeZt7FTOSwIhAKct1tadWtkGJqDY4+5ewVeuOD/K4a71qyG14vRRHQ7/"}],"size":2173,"noattachment":false,"key":"/aborter/-/aborter-3.0.1.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/aborter_3.0.1_1737075070077_0.06629156009049231"},"_hasShrinkwrap":false,"readme":"# Aborter\n\nA minimal reimplementation of [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) and [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal).\n\nThis library is only 0.5kb minified, but it's not strictly spec-compliant, if you need that go with [`abort-controller`](https://www.npmjs.com/package/abort-controller).\n\n## Install\n\n```sh\nnpm install aborter\n```\n\n## Usage\n\n```ts\nimport Aborter from 'aborter';\n\nconst aborter = new Aborter ();\n\nconsole.log ( aborter.signal.aborted ); // => false\n\naborter.signal.addEventListener ( 'abort', () => {\n\n  console.log ( aborter.signal.aborted ); // => true\n\n});\n\naborter.abort (); // Aborting, causing event handlers to be triggered and the \"aborted\" property to be set to \"true\"\n```\n\n## License\n\nMIT © Fabio Spampinato\n","publish_time":1737075070289,"_cnpm_publish_time":1737075070289,"dist-tags":{"latest":"3.0.1"}}