We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
estraverse.traverse (ast, { enter: function (node, parent) { if (node.type == 'FunctionExpression' || node.type == 'FunctionDeclaration') return estraverse.VisitorOption.Skip; }, leave: function (node, parent) { if (node.type == 'VariableDeclarator') console.log (node.id.name); } });
How do I modify this code to remove all variable declarations from the code, all objects and properties
example: var b = navigator; var h = function () {var enabled = navigator.userAgent} var c = b.appName
how I would like it to look: b is navigator; h is a function enabled is navigator.userAgent c is b.appname
object b is navigator property is appName
The text was updated successfully, but these errors were encountered:
You probably want to use escope for this.
Sorry, something went wrong.
No branches or pull requests
estraverse.traverse (ast, {
enter: function (node, parent) {
if (node.type == 'FunctionExpression' || node.type == 'FunctionDeclaration')
return estraverse.VisitorOption.Skip;
},
leave: function (node, parent) {
if (node.type == 'VariableDeclarator')
console.log (node.id.name);
}
});
How do I modify this code to remove all variable declarations from the code, all objects and properties
example:
var b = navigator;
var h = function () {var enabled = navigator.userAgent}
var c = b.appName
how I would like it to look:
b is navigator;
h is a function
enabled is navigator.userAgent
c is b.appname
object b is navigator
property is appName
The text was updated successfully, but these errors were encountered: