babel-plugin-transform-throw-expressions
This plugin transforms Throw Expressions into an IIFE.
Example
{ const test = param === true || throw 'Falsey!';}
Installation
npm install --save-dev babel-plugin-transform-throw-expressions
Usage
.babelrc
(Recommended)
Via .babelrc
Via CLI
babel --plugins transform-throw-expressions script.js
Via Node API
;