remove-try-require

0.0.0 • Public • Published

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.0
    33
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.0
    33

Package Sidebar

Install

npm i remove-try-require

Weekly Downloads

33

Version

0.0.0

License

MIT

Last publish

Collaborators

  • hughsk