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 : 3.145.175.71
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
unp_probe /
node_modules /
babel-traverse /
Delete
Unzip
Name
Size
Permission
Date
Action
lib
[ DIR ]
drwxr-xr-x
2021-02-04 21:24
node_modules
[ DIR ]
drwxr-xr-x
2021-02-04 21:24
.npmignore
22
B
-rw-r--r--
2017-02-25 18:26
README.md
705
B
-rw-r--r--
2017-08-16 14:15
package-lock.json
1.83
KB
-rw-r--r--
2017-08-15 20:34
package.json
1.91
KB
-rw-r--r--
2021-02-04 21:24
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)