estraverse-fb
Drop-in for estraverse that enables traversal over React's JSX nodes.
Last updated 10 years ago by rreverser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install estraverse-fb 
SYNC missed versions from official npm registry.

estraverse-fb

Build Status

Drop-in for estraverse that enables traversal over React's JSX and Flow nodes using monkey-patching technique.

You can use estraverse-fb in two possible ways:

  • by default, you just require it and it injects needed keys into your installed version of estraverse (it's installed automatically if you don't have it yet):

    var estraverse = require('estraverse-fb');
    /* same as:
        require('estraverse-fb');
        var estraverse = require('estraverse');
    */
    
    estraverse.traverse(ast, {
        enter: ...,
        leave: ...
    });
    
  • alternatively, you can use it manually for selected traversals:

    var jsxKeys = require('estraverse-fb/keys');
    
    estraverse.traverse(ast, {
        enter: ...,
        leave: ...,
        keys: jsxKeys
    })
    

Check out [estraverse page](https://github.com/Constellation/estraverse) for detailed usage.

Current Tags

  • 1.3.2                                ...           latest (7 years ago)

7 Versions

  • 1.3.2                                ...           7 years ago
  • 1.3.1                                ...           10 years ago
  • 1.3.0                                ...           10 years ago
  • 1.2.0                                ...           10 years ago
  • 1.1.1                                ...           10 years ago
  • 1.1.0                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Total 6
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (4)
Dependents (2)

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