{"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":"http://registry-npm.ywwl.com/@putout/plugin-apply-cause/download/@putout/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,"size":373,"noattachment":false,"key":"/@putout/plugin-apply-cause/-/@putout/plugin-apply-cause-0.0.0-stage.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"description":"Temporary package placeholder for staged publishing","directories":{},"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","publish_time":1793223149786,"_cnpm_publish_time":1793223149786,"dist-tags":{"latest":"1.0.0"}}