REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.58 KB
Close
/home/byroehnu/easepay.easetack.com/node_modules/estree-walker/README.md
Text
Base64
# estree-walker Simple utility for walking an [ESTree](https://github.com/estree/estree)-compliant AST, such as one generated by [acorn](https://github.com/marijnh/acorn). ## Installation ```bash npm i estree-walker ``` ## Usage ```js var walk = require( 'estree-walker' ).walk; var acorn = require( 'acorn' ); ast = acorn.parse( sourceCode, options ); // https://github.com/acornjs/acorn walk( ast, { enter: function ( node, parent, prop, index ) { // some code happens }, leave: function ( node, parent, prop, index ) { // some code happens } }); ``` Inside the `enter` function, calling `this.skip()` will prevent the node's children being walked, or the `leave` function (which is optional) being called. Call `this.replace(new_node)` in either `enter` or `leave` to replace the current node with a new one. Call `this.remove()` in either `enter` or `leave` to remove the current node. ## Why not use estraverse? The ESTree spec is evolving to accommodate ES6/7. I've had a couple of experiences where [estraverse](https://github.com/estools/estraverse) was unable to handle an AST generated by recent versions of acorn, because it hard-codes visitor keys. estree-walker, by contrast, simply enumerates a node's properties to find child nodes (and child lists of nodes), and is therefore resistant to spec changes. It's also much smaller. (The performance, if you're wondering, is basically identical.) None of which should be taken as criticism of estraverse, which has more features and has been battle-tested in many more situations, and for which I'm very grateful. ## License MIT
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 3 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
dist
DIR
-
drwxr-xr-x
2026-03-14 01:49:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
src
DIR
-
drwxr-xr-x
2026-03-14 01:49:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
types
DIR
-
drwxr-xr-x
2026-03-14 01:49:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
.htaccess
127 B
lr--r--r--
2026-03-14 01:49:20
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
CHANGELOG.md
1.51 KB
lrw-r--r--
2026-02-28 00:28:06
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LICENSE
1.10 KB
lrw-r--r--
2026-02-28 00:26:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
package.json
848 B
lrw-r--r--
2026-02-28 00:28:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
README.md
1.58 KB
lrw-r--r--
2026-02-28 00:28:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).