{"name":"abort-error","version":"1.0.1","author":{"name":"Alex Potsides","email":"alex@achingbrain.net"},"license":"Apache-2.0 OR MIT","_id":"abort-error@1.0.1","maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"homepage":"https://github.com/achingbrain/abort-error#readme","bugs":{"url":"https://github.com/achingbrain/abort-error/issues"},"dist":{"shasum":"526c17caf2ac9eb1fab1ffdff18c5076157a324e","tarball":"http://registry-npm.ywwl.com/abort-error/download/abort-error-1.0.1.tgz","fileCount":9,"integrity":"sha512-fxqCblJiIPdSXIUrxI0PL+eJG49QdP9SQ70qtB65MVAoMr2rASlOyAbJFOylfB467F/f+5BCLJJq58RYi7mGfg==","signatures":[{"sig":"MEYCIQDVeM/uQFKZK0dVBgTstRZ3QUjsDl8TdNgeJOD4pfawQQIhAMZpUWdxr8LtSfI3IwSyPDaGpOmMr3kkl6W5fm8N5KwW","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/abort-error@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":10605,"size":3260,"noattachment":false,"key":"/abort-error/-/abort-error-1.0.1.tgz"},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"}},"gitHead":"ca555e12a3f32a6d92529a5b4eb16904d86a4fdc","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 -t node -t browser","build":"aegir build","clean":"aegir clean","release":"aegir release","dep-check":"aegir dep-check","doc-check":"aegir doc-check","test:node":"aegir test -t node --cov","spell-check":"aegir spell-check","test:chrome":"aegir test -t browser --cov","test:firefox":"aegir test -t browser -- --browser firefox","test:electron-main":"aegir test -t electron-main"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"repository":{"url":"git+https://github.com/achingbrain/abort-error.git","type":"git"},"_npmVersion":"10.9.2","description":"An error to be used by AbortSignal handlers","directories":{},"_nodeVersion":"22.14.0","eslintConfig":{"extends":"ipfs","parserOptions":{"project":true,"sourceType":"module"}},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"aegir":"^45.1.4"},"_npmOperationalInternal":{"tmp":"tmp/abort-error_1.0.1_1742372594602_0.39189211213408903","host":"s3://npm-registry-packages-npm-production"},"readme":"# abort-error\n\n[![codecov](https://img.shields.io/codecov/c/github/achingbrain/abort-error.svg?style=flat-square)](https://codecov.io/gh/achingbrain/abort-error)\n[![CI](https://img.shields.io/github/actions/workflow/status/achingbrain/abort-error/js-test-and-release.yml?branch=main\\&style=flat-square)](https://github.com/achingbrain/abort-error/actions/workflows/js-test-and-release.yml?query=branch%3Amain)\n\n> An error to be used by AbortSignal handlers\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\nA simple error class and options interface that seems to get copied from\nproject to project.\n\n## Example - Using AbortError\n\n```JavaScript\nimport { AbortError } from 'abort-error'\n\n// a promise that will be settled later\nconst deferred = Promise.withResolvers()\n\nconst signal = AbortSignal.timeout(1000)\nsignal.addEventListener('abort', () => {\n  deferred.reject(new AbortError())\n})\n```\n\n## Example - Using AbortOptions\n\n```TypeScript\nimport type { AbortOptions } from 'abort-error'\n\nasync function myFunction (options?: AbortOptions) {\n  return fetch('https://example.com', {\n    signal: options?.signal\n  })\n}\n```\n\n# Install\n\n```console\n$ npm i abort-error\n```\n\n## Browser `<script>` tag\n\nLoading this module through a script tag will make its exports available as `AbortError` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/abort-error/dist/index.min.js\"></script>\n```\n\n# API Docs\n\n- <https://achingbrain.github.io/abort-error>\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](https://github.com/achingbrain/abort-error/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](https://github.com/achingbrain/abort-error/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","publish_time":1742372594853,"_cnpm_publish_time":1742372594853,"dist-tags":{"latest":"1.0.2"}}