ast-replace-this

2.0.0 • Public • Published

ast-replace-this

Replaces the this variable with the given expression. Consumes/produces Mozilla ASTs.

API

replaceThis(Node, replacement, recurse = false) -> Node

Returns a new AST with all ThisExpressions replaced with the given expression. If recurse is truthy, it will recurse to cover every scope in the AST.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i ast-replace-this

Weekly Downloads

1

Version

2.0.0

License

MIT

Last publish

Collaborators