Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Transform stream to remove require calls from inside a try{} statement
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
LICENSE.md
README.md
ast.js
fixture.js
index.js
package.json
test.js

README.md

remove-try-require Flattr this!experimental

Transform stream to remove require calls from inside a try{} statement. Useful for modules looking for browserify compatability while using the try/catch optional dependency trick.

Usage

remove-try-require

remove-try-require is jsut a browserify transform stream, so you can use it like so:

browserify -t remove-try-require

Or by including it in your project's package.json file:

{
  "browserify": {
    "transform": [
      "remove-try-require"
    ]
  }
}

You can also find an AST transform that plays nice with ast-pipeline at require('remove-try-require/ast').

License

MIT. See LICENSE.md for details.

Something went wrong with that request. Please try again.