babel-plugin-syntax-optional-catch-binding
Allow parsing of optional catch bindings
Last updated 7 years ago by hzoo .
MIT · Repository · Original npm · Tarball · package.json
$ npm install babel-plugin-syntax-optional-catch-binding 
SYNC missed versions from official npm registry.

babel-plugin-syntax-optional-catch-binding

This plugin allows Babel to parse optional catch bindings.

Example

Syntax

try {
  throw 0;
} catch {
  doSomethingWhichDoesntCareAboutTheValueThrown();
  console.log("Yay, code executes!");
}

Installation

npm install --save-dev babel-plugin-syntax-optional-catch-binding

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["syntax-optional-catch-binding"]
}

Via CLI

babel --plugins syntax-optional-catch-binding script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["syntax-optional-catch-binding"]
});

References

Current Tags

  • 7.0.0-alpha.16                                ...           latest (7 years ago)
  • 7.0.0-beta.3                                ...           next (7 years ago)

9 Versions

  • 7.0.0-beta.3                                ...           7 years ago
  • 7.0.0-beta.2                                ...           7 years ago
  • 7.0.0-beta.1                                ...           7 years ago
  • 7.0.0-beta.0                                ...           7 years ago
  • 7.0.0-alpha.20                                ...           7 years ago
  • 7.0.0-alpha.19                                ...           7 years ago
  • 7.0.0-alpha.18                                ...           7 years ago
  • 7.0.0-alpha.17                                ...           7 years ago
  • 7.0.0-alpha.16                                ...           7 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE