🌜
🌞
babel-plugin-syntax-throw-expressions

babel-plugin-syntax-throw-expressions

v7.0.0-beta.3

Allow parsing of Throw Expressions

npm install babel-plugin-syntax-throw-expressions

README

babel-plugin-syntax-throw-expressions

Allow parsing of Throw Expressions:

function test(param = throw new Error('required!')) {
  const test = param === true || throw new Error('Falsey!');
}

Installation

npm install --save-dev babel-plugin-syntax-throw-expressions

Usage

.babelrc

{
  "plugins": ["syntax-throw-expressions"]
}

Via CLI

babel --plugins syntax-throw-expressions script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["syntax-throw-expressions"]
});

General

License
MIT
Typescript Types
None found
Tree-shakeable
No

Popularity

GitHub Stargazers
41.4K
Community Interest
43.9K
Number of Forks
5,455

Maintenance

Commits
10/219/22070
Last Commit
Open Issues
628
Closed Issues
7,633
Open Pull Requests
149
Closed Pull Requests
1,045

Versions

Versions Released
10/219/2201
Latest Version Released
Oct 15, 2017
Current Tags
latest7.0.0-beta.3
next7.0.0-beta.3

Contributors

sebmck
sebmck
Commits: 5,192
hzoo
hzoo
Commits: 1,264
loganfsmyth
loganfsmyth
Commits: 594
nicolo-ribaudo
nicolo-ribaudo
Commits: 580
existentialism
existentialism
Commits: 469
danez
danez
Commits: 433
JLHwung
JLHwung
Commits: 367
marijnh
marijnh
Commits: 264
RReverser
RReverser
Commits: 233
jamiebuilds
jamiebuilds
Commits: 224
amasad
amasad
Commits: 172
jridgewell
jridgewell
Commits: 159
xtuc
xtuc
Commits: 106
yavorsky
yavorsky
Commits: 89
kaicataldo
kaicataldo
Commits: 82