Last active
October 7, 2018 13:20
-
-
Save daybrush/1d6f6c44928a51509fc6b84e883bc006 to your computer and use it in GitHub Desktop.
traverse
This file contains hidden or 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
import traverse from "@babel/traverse"; | |
traverse(ast, { | |
FunctionDeclaration: function (path) { | |
// path.node (FunctionDeclaration) | |
// path.node.id (Identifier) | |
console.log(path.node.id.name); | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment