ast-visitor
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

ast-visitor

npm version npm downloads

Install

npm i ast-visitor

Usage

import { visit } from 'ast-visitor'

visit( ast, path => {
  console.log( path )
}, {
  getType: node => node.type, // read node.type by default
  getChildren: node => node.children, // read node.children by default
  keys: {
    Property: [ 'key', 'value' ],
  },
} )

License

MIT © fengzilong

Readme

Keywords

none

Package Sidebar

Install

npm i ast-visitor

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

6.28 kB

Total Files

6

Last publish

Collaborators

  • fengzilong