{"_id":"@putout/plugin-convert-throw","_rev":"5-875844948d633063bef5b4a67a192129","name":"@putout/plugin-convert-throw","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.0":{"name":"@putout/plugin-convert-throw","version":"1.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@1.0.0","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"http://github.com/coderaiser/putout","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"f91230ae8040078309a871b3c3816b052279151a","tarball":"https://registry.npmjs.org/@putout/plugin-convert-throw/-/plugin-convert-throw-1.0.0.tgz","fileCount":4,"integrity":"sha512-FyWiWaEgwpG1Ec+SAdbAdYVei9fKpZbt6k7bv5c3xJVFRoV1B+MVMBpVvagmil8KHYgbOViSVQBzmJiQYCV68A==","signatures":[{"sig":"MEUCIQCrRAuz3p4lbOFLGoPMTEWbCi1lWFktudunduAxvvBwYwIgfx6TdqXbOzwqV69HYhR7NK/BVKVtbS2hZ5dXCOfVb+s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3310,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJ0aRCRA9TVsSAnZWagAA1GkP/RZ8qB1CW2x19o9VnxMf\ngjAz6cj7qdRUUkGjzjVBpNIWR5at5eCuj2i7rCqSWp/kTaHHP3dvWWjpsXbI\nD/wBec1f2vpZJ5ss7rJYpJRBgfHaCNUFQSt/YSixOwHwQ2rLBqDt9pG2piCF\nKboVQNarMRnmv5rdC/ngKu7scZRbxUUPUaag1EmHuuFb7D+PtSCddPtIq6xU\n9MLEbqvT7sRngaCJu+j46X5FIWlcT1EYxqgS/jxFVkkr0ARGtjSyaypNVBOg\n1c8sRp4qzlQmlP4WhNh72bYCh0TIKbqB7xIxCMVJivVyS6bwLUz0T3WTINCb\nA5oaxkp5x0z9L6RKA+gE54E9WTg5fM+luE/6tG7jBLxVqqusrSr8Dqo0PHJo\nqzPf14JSkRb7BKjiLlZtfDMWvVcDZb52LNb+ZnT/UNqX2NXErVcBUPgmZ+nt\nzp9xGAWLaX+egaCPqxd2z1ORlTkLgQZKLZsdHm6PEbQ5w+sTwAap6c042wmd\n+rl4ZyA6aULSSmHaSGG4NJErPMtjJu2nM1oDn/stY7R/v4wC9Tes7d6yNFyY\n58Mcq7rPDxaXzTd+b2IJ8LJzw46tMKELlv5069FneMdzYaSmltr93/L43bHX\njekuOvCAb1KgV8IBhXaP54EbAGs7y24/ynDTJQhLNCtrxAaEEc5MQDStQqVH\n6aLo\r\n=gVrH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/convert-throw.js","engines":{"node":">=8.3.0"},"release":false,"scripts":{"lint":"madrun lint","test":"madrun test","coverage":"madrun coverage","fix:lint":"madrun fix:lint"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"6.12.1","description":"putout plugin adds ability to convert throw statement into throw expression","directories":{},"_nodeVersion":"13.7.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.0.0","eslint":"^6.2.0","madrun":"^5.0.0","coveralls":"^3.0.0","supertape":"^1.0.3","@putout/test":"^1.3.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^3.0.0"},"peerDependencies":{"putout":">=7.7"},"_npmOperationalInternal":{"tmp":"tmp/plugin-convert-throw_1.0.0_1579632273131_0.47047260230979093","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@putout/plugin-convert-throw","version":"1.0.1","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@1.0.1","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"homepage":"http://github.com/coderaiser/putout","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"tag":false,"dist":{"shasum":"9f3c4a65a5a36511abeda570cdd2ea81d8d250f0","tarball":"https://registry.npmjs.org/@putout/plugin-convert-throw/-/plugin-convert-throw-1.0.1.tgz","fileCount":4,"integrity":"sha512-osOeQ8UueD9hOko/v4UBd1tSf7xWSzHDDSsS5Dwg5cP6pGNwJ25as8hpqkgyWZXUxMJCuMdJ0p6lpRJfewRvoA==","signatures":[{"sig":"MEUCIQDmi+fBdee3SOuJrEpwW0krtHjTXyfDHGKfWeofIEA0jQIgEdcudndFxuP8CFpuyBBvvY78EiSwXRvkY83PJet4kYg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3360,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJ03dCRA9TVsSAnZWagAAQlAP/jP3SxfUMvosMcMZ1wJu\nyAXcHmUV4F2Uz0iEM90h7znvVxgrehppRVPaHXyd8p5+9vkPdh58bTjIkMZI\nHS9TGCkkpiQZaE2ts8Pn3MrEPyNKY4cqcVNT3pFmwZhW10HMB2DrhbrNsbi7\n8pf19nDqecCI7rrRdm7QJhSgq7JTgoNyNRRlfts7pteyDXhlbVLs2wX7J1Ap\nez7GNXjPaAOgEX65CkYXN3lwYeDX9jHfXcEmYVrK9TGANE3y1kY9ZMCX7ODW\nsQDdXKUvHA1SfSZTVL/DCiiQUuVxpvgKq96vJO2KF8qzlGlWs3Wkl0IGIAwG\nojqx/nKgq4m8HB6nnF1eZARn4rqOO4kqYfuNF1YnuZinaK7eToyc3bXcZgae\n1F2JsqaTvAy2OQb8LUDqSHcm2zGlzj/6LJipG2nTqYKagb9t+XMHDSk9ij6a\nXAQEm/o5rMIKCbqVHR9qMzyesxL7BOcgYSbNGcRyA4NBSgoLpYyqUEVAQuww\nor124mcHBNy8r5Slc9++HxF62dr1G/aA9HZ09YOBWKE+8CUhU3KzzcwlBGPG\np34zSztjRpbsxqvut4QvmqQupROzajbUV+qscRVf4TO2bEAgyaClBPdNdtlO\nRr33g0UMTiesPP8pGPmtQa6Gi0TkHMrxcfthX49LVyLWuCTABkgpqIPe+b5V\ny+2M\r\n=hKdO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/convert-throw.js","engines":{"node":">=8.3.0"},"release":false,"scripts":{"lint":"madrun lint","test":"madrun test","coverage":"madrun coverage","fix:lint":"madrun fix:lint"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"changelog":false,"repository":{"url":"git://github.com/coderaiser/putout.git","type":"git"},"_npmVersion":"6.12.1","description":"putout plugin adds ability to convert throw statement into throw expression","directories":{},"_nodeVersion":"13.7.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.0.0","eslint":"^6.2.0","madrun":"^5.0.0","coveralls":"^3.0.0","supertape":"^1.0.3","@putout/test":"^1.3.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^3.0.0"},"peerDependencies":{"putout":">=7.7"},"_npmOperationalInternal":{"tmp":"tmp/plugin-convert-throw_1.0.1_1579634140600_0.2513057287772522","host":"s3://npm-registry-packages"}},"2.0.0":{"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":"https://registry.npmjs.org/@putout/plugin-convert-throw/-/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},"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"}},"3.0.0":{"name":"@putout/plugin-convert-throw","version":"3.0.0","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin adds ability to convert throw statement into throw expression","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-throw#readme","main":"lib/convert-throw.js","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","putout-plugin","plugin","convert","throw"],"devDependencies":{"@babel/core":"^8.0.0","@babel/eslint-parser":"^8.0.0-rc.2","@babel/plugin-proposal-throw-expressions":"^8.0.0-rc.2","@putout/eslint-flat":"^4.0.0","@putout/test":"^15.0.0","eslint":"^10.0.0","eslint-plugin-putout":"^31.0.0","madrun":"^13.0.0","superc8":"^12.0.0"},"peerDependencies":{"putout":">=42"},"license":"MIT","engines":{"node":">=22"},"publishConfig":{"access":"public"},"_id":"@putout/plugin-convert-throw@3.0.0","gitHead":"5409dba6a0b5819c2019707b33847a1eb79e0512","bugs":{"url":"https://github.com/coderaiser/putout/issues"},"_nodeVersion":"26.3.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-zAyIp2FJba/ZxvYrkVL0GT298d+BvTt2k57ZfsSxmJi+nLnHvXXbLhAstjhpFodd5DcZUYl5PvqJt1stR2LNNw==","shasum":"acfc11c83a6ceb82e50d80881e7b020a679d1571","tarball":"https://registry.npmjs.org/@putout/plugin-convert-throw/-/plugin-convert-throw-3.0.0.tgz","fileCount":4,"unpackedSize":3615,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEtrJ1RllCo2bFFL/nnZoSFZhQ0XYhjZtdgCj2wdTJwfAiA7MGcBticNehJhubWCKop80wpBlqSMkhddYw/dtd3+og=="}]},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-convert-throw_3.0.0_1781642960330_0.9552961441689511"},"_hasShrinkwrap":false}},"time":{"created":"2020-01-21T18:44:32.950Z","modified":"2026-06-16T20:49:20.605Z","1.0.0":"2020-01-21T18:44:33.224Z","1.0.1":"2020-01-21T19:15:40.838Z","2.0.0":"2026-01-28T12:17:45.379Z","3.0.0":"2026-06-16T20:49:20.449Z"},"bugs":{"url":"https://github.com/coderaiser/putout/issues"},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"license":"MIT","homepage":"https://github.com/coderaiser/putout/tree/master/packages/plugin-convert-throw#readme","keywords":["putout","putout-plugin","plugin","convert","throw"],"repository":{"type":"git","url":"git+https://github.com/coderaiser/putout.git"},"description":"🐊Putout plugin adds ability to convert throw statement into throw expression","maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"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","readmeFilename":"README.md"}