{"name":"@putout/plugin-convert-throw","version":"2.0.0","keywords":["putout","putout-plugin","plugin","convert","throw"],"author":{"url":"https://github.com/coderaiser","name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"license":"MIT","_id":"@putout/plugin-convert-throw@2.0.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-throw#readme","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"d142a0d1e3e8c03dc62affd84b2a312abc4a3b71","tarball":"http://registry-npm.ywwl.com/@putout/plugin-convert-throw/download/@putout/plugin-convert-throw-2.0.0.tgz","fileCount":4,"integrity":"sha512-DL+0BQ2TH7gg+7uClLBvacWihtrA9KwKR7Acyq41PxjXTmxr5kqzGGFv8Dq/lH/ukmYHBMFEnqVuXi38FpMOPw==","signatures":[{"sig":"MEQCIEUYzfsABGcGVSqEIVSIrYGuO0FzeLTXNE9A1PEBR4scAiATKZ/K0w6hcr7lRCJ2ehTvzxC8rJpEz7aR/rfXD02EDQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3666,"size":1867,"noattachment":false,"key":"/@putout/plugin-convert-throw/-/@putout/plugin-convert-throw-2.0.0.tgz"},"main":"lib/convert-throw.js","type":"module","engines":{"node":">=22"},"gitHead":"c81ceae32c6d205adfe4253e2eab231bcd4fe5bc","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","watch:test":"madrun watch:test"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git+https://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"11.4.2","description":"🐊Putout plugin adds ability to convert throw statement into throw expression","directories":{},"_nodeVersion":"25.4.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.0.0","eslint":"^10.0.0-alpha.0","madrun":"^12.0.0","@babel/core":"^8.0.0-alpha.1","@putout/test":"^15.0.0","eslint-plugin-n":"^17.0.0","@putout/eslint-flat":"^4.0.0","@babel/eslint-parser":"^8.0.0-alpha.1","eslint-plugin-putout":"^30.0.0","@babel/plugin-proposal-throw-expressions":"^8.0.0-alpha.1"},"peerDependencies":{"putout":">=41"},"_npmOperationalInternal":{"tmp":"tmp/plugin-convert-throw_2.0.0_1769602665236_0.5670336726931529","host":"s3://npm-registry-packages-npm-production"},"readme":"# @putout/plugin-convert-throw [![NPM version][NPMIMGURL]][NPMURL]\n\n> This proposal defines new syntax to **throw** exceptions from within an expression context.\n>\n> (c) [tc39](https://github.com/tc39/proposal-throw-expressions#status)\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-throw.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-throw \"npm\"\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability convert **throw** statement to expression.\n\n## Install\n\n```\nnpm i @putout/plugin-convert-throw -D\n```\n\n## Rule\n\n```json\n{\n    \"rules\": {\n        \"convert-throw\": \"on\"\n    },\n    \"plugins\": [\n        \"convert-throw\"\n    ]\n}\n```\n\n## ❌ Example of incorrect code\n\n```js\nconst fn = () => {\n    throw Error('hello');\n};\n```\n\n## ✅ Example of correct code\n\n```js\nconst fn = () => throwError('hello');\n```\n\n## License\n\nMIT\n","publish_time":1769602665379,"_cnpm_publish_time":1769602665379,"dist-tags":{"latest":"3.0.0"}}