You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be noted in the Readme that acornGlobals(ast) will mutate ast, adding array of parents to Identifier nodes. These unexpected properties might trip folks that are walking the AST after running acornGlobals.
Alternatively, acornGlobals could deep clone the input, to avoid mutating it.
The text was updated successfully, but these errors were encountered:
We don't currently document the approach of passing in an AST node - we only document passing in a string. I would accept a PR to add documentation for the AST based approach to the README though (along with documenting the above caveat).
It should be noted in the Readme that
acornGlobals(ast)
will mutateast
, adding array ofparents
toIdentifier
nodes. These unexpected properties might trip folks that are walking the AST after runningacornGlobals
.Alternatively, acornGlobals could deep clone the input, to avoid mutating it.
The text was updated successfully, but these errors were encountered: