{"name":"abort-error","version":"0.0.0","author":{"name":"Alex Potsides","email":"alex@achingbrain.net"},"license":"Apache-2.0 OR MIT","_id":"abort-error@0.0.0","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":"14e8a5c7479b9d505a102c2ce9558471b53a5f44","tarball":"http://registry-npm.ywwl.com/abort-error/download/abort-error-0.0.0.tgz","fileCount":9,"integrity":"sha512-WH8fk17GmiJ3IeBS13d844yH+pPhLxFgslqkLDeXNZDXLO3AVGczuUE1fGtFuvKTgjDyPa6RvbXoWBl6MSantw==","signatures":[{"sig":"MEUCIEE+7qou3DZamvd0LmgCoSj2Yq1zgBNd+q8gux6qiZfIAiEAyXqlAbSzCnnojSM+JJE1RUUXkvgvhaP/ufIuCZt8jsQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8778,"size":2975,"noattachment":false,"key":"/abort-error/-/abort-error-0.0.0.tgz"},"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 -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","test:chrome":"aegir test -t browser --cov","test:firefox":"aegir test -t browser -- --browser firefox","test:electron-main":"aegir test -f dist/test/node.js -t electron-main"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"repository":{"url":"git+https://github.com/achingbrain/abort-error.git","type":"git"},"_npmVersion":"10.5.0","description":"An error to be used by AbortSignal handlers","directories":{},"_nodeVersion":"20.12.2","eslintConfig":{"extends":"ipfs","parserOptions":{"project":true,"sourceType":"module"}},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"aegir":"^44.1.4"},"_npmOperationalInternal":{"tmp":"tmp/abort-error_0.0.0_1729776321623_0.4599231860970405","host":"s3://npm-registry-packages"},"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":1729776321810,"_cnpm_publish_time":1729776321810,"dist-tags":{"latest":"1.0.2"}}