Created
April 22, 2022 16:20
-
-
Save prendradjaja/7ea9b944b21e5e28d2abb0175ad52992 to your computer and use it in GitHub Desktop.
jscodeshift ast explorer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("@babel/preset-env/package.json"); // @babel/preset-env is a peer dependency. | |
var j = require("jscodeshift").withParser('ts'); | |
const root = j(` | |
YOUR_CODE_HERE; | |
`).nodes()[0]; | |
console.log(root); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment