{"_id":"@putout/plugin-apply-cause","_rev":"2-e1ef4bfbfa32c7add0145ee79422e08f","name":"@putout/plugin-apply-cause","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.0-stage":{"name":"@putout/plugin-apply-cause","version":"0.0.0-stage","_id":"@putout/plugin-apply-cause@0.0.0-stage","stub":true,"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"dist":{"shasum":"5ba25033a0b8b2d9b16b22701e68251326b7dd9f","tarball":"https://registry.npmjs.org/@putout/plugin-apply-cause/-/plugin-apply-cause-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-j+rNlB9Y1oTiczik1mYEekYRuOYQyEusKV5J5eCT+oXSvelYFZvz2sQmhQ3YMXSsHIwRgShmaGN3N2IMz5Zlng==","signatures":[{"sig":"MEUCIG1Dd8us2IGA8NZCGiT1O6G6dxfISwkUMPzX405SdHs/AiEAqGqM129LpxXJkid3Vex+7lDIjClZRFS73w4DEO3JzuE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":348},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"description":"Temporary package placeholder for staged publishing","directories":{}},"1.0.0":{"_id":"@putout/plugin-apply-cause@1.0.0","tag":false,"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"dist":{"shasum":"e63313b13280fba8824fb07f5db944feccea3d58","tarball":"https://registry.npmjs.org/@putout/plugin-apply-cause/-/plugin-apply-cause-1.0.0.tgz","fileCount":4,"integrity":"sha512-krv4fwNnFIIyEqo3aIgGTtF2OZ3chZcucea94FX7ZkmlivJAqHz+APjBiGNF5kR7/xIZSQa3i+nD9ykiwGqZuA==","signatures":[{"sig":"MEUCIQDk+kAQQLxHJ09PzeHl0NoFGc3sWMxoZIWXvlj23UPALwIgb1uhfmEM96nqjskyg3+MF53+A7b0zc5kscGiBHvZhVA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCl9F/FO4Xdsj9s7MXlfKipWROzM0DABhLgSVPouUC0TAIgQizSN7glN6zTUR0jFEQIVN8HWZ18fzfIjcWnsJ0imKA="}],"unpackedSize":4075},"main":"lib/apply-cause.js","name":"@putout/plugin-apply-cause","type":"module","author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"engines":{"node":">=22"},"gitHead":"f6bcde5f674c06ff3ec4795ff80e0091ee0ad722","license":"MIT","release":false,"scripts":{"lint":"madrun lint","test":"madrun test","report":"madrun report","coverage":"madrun coverage","fix:lint":"madrun fix:lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","wcausech:test":"madrun wcausech:test"},"version":"1.0.0","_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-cause#readme","keywords":["putout","putout-plugin","plugin","cause"],"changelog":false,"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"12.0.2","description":"🐊Putout plugin adds ability to apply 'cause'","directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_nodeVersion":"26.13.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.0.0","madrun":"^13.0.0","nodemon":"^3.0.1","superc8":"^12.0.0","@putout/test":"^15.0.0","@putout/eslint-flat":"^4.0.0","eslint-plugin-putout":"^31.0.0"},"peerDependencies":{"putout":">=42"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-apply-cause_1.0.0_1793223276723_0.41109459277652816"}}},"time":{"created":"2026-10-28T21:32:29.786Z","modified":"2026-10-28T21:34:36.963Z","0.0.0-stage":"2026-10-28T21:32:29.786Z","1.0.0":"2026-10-28T21:34:36.806Z"},"description":"🐊Putout plugin adds ability to apply 'cause'","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"readme":"# @putout/plugin-apply-cause [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-apply-cause.svg?style=flcause&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-apply-cause \"npm\"\n\n> The `cause` data property of an Error instance indicates the specific original cause of the error.:\n>\n> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause)\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to apply `cause`\n\nCheckout in 🐊[**Putout Editor**](https://putout.cloudcmd.io/#/gist/7f13036172975d7b27cf371a9fbb5e8c/4db40fe32bfdc4f8475692ba139608298f15605f).\n\n## Install\n\n```\nnpm i @putout/plugin-apply-cause\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"apply-cause\": \"on\"\n    }\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\ntry {} catch(error) {\n    if (controller.signal.aborted)\n        throw Error('timeout');\n}\n```\n\n## ✅ Example of correct code\n\n```js\ntry {} catch(error) {\n    if (controller.signal.aborted)\n        throw Error('timeout', {\n            cause: error,\n        });\n}\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-apply-cause#readme","keywords":["putout","putout-plugin","plugin","cause"],"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"license":"MIT"}