🐊Putout plugin adds ability to convert throw statement into throw expression
npm install @putout/plugin-convert-throw> This proposal defines new syntax to throw exceptions from within an expression context.
>
> (c) tc39
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-convert-throw.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-convert-throw "npm"
🐊Putout plugin adds ability convert throw statement to expression.
```
npm i @putout/plugin-convert-throw -D
`json`
{
"rules": {
"convert-throw": "on"
},
"plugins": [
"convert-throw"
]
}
`js`
const fn = () => {
throw Error('hello');
};
`js``
const fn = () => throwError('hello');
MIT