babel-plugin-transform-optional-catch-binding
Compile optional catch bindings
Last updated 9 years ago by hzoo .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install babel-plugin-transform-optional-catch-binding 
SYNC missed versions from official npm registry.

babel-plugin-transform-optional-catch-binding

Optional catch binding enables the catch block to execute whether or not an argument is passed to the catch statement (CatchClause).

Examples

try {
  throw 0;
} catch {
  doSomethingWhichDoesntCareAboutTheValueThrown();
}
try {
  throw 0;
} catch {
  doSomethingWhichDoesntCareAboutTheValueThrown();
} finally {
  doSomeCleanup();
}

Installation

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

Usage

Via .babelrc (Recommended)

.babelrc

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

Via CLI

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

Via Node API

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

References

Current Tags

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

9 Versions

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

Copyright 2013 - present © cnpmjs.org | Home |