Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 18.220.244.188
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
wb /
node_modules /
babel-traverse /
Delete
Unzip
Name
Size
Permission
Date
Action
lib
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
node_modules
[ DIR ]
drwxrwxr-x
2022-08-30 11:49
.npmignore
22
B
-rw-rw-r--
2022-08-30 11:49
README.md
705
B
-rw-rw-r--
2022-08-30 11:49
package-lock.json
1.83
KB
-rw-rw-r--
2022-08-30 11:49
package.json
759
B
-rw-rw-r--
2022-08-30 11:49
Save
Rename
# babel-traverse > babel-traverse maintains the overall tree state, and is responsible for replacing, removing, and adding nodes. ## Install ```sh $ npm install --save babel-traverse ``` ## Usage We can use it alongside Babylon to traverse and update nodes: ```js import * as babylon from "babylon"; import traverse from "babel-traverse"; const code = `function square(n) { return n * n; }`; const ast = babylon.parse(code); traverse(ast, { enter(path) { if (path.isIdentifier({ name: "n" })) { path.node.name = "x"; } } }); ``` [:book: **Read the full docs here**](https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md#babel-traverse)