npm.io
1.0.0 • Published 8 years ago

himalaya-walk

Licence
MIT
Version
1.0.0
Deps
0
Size
3 kB
Vulns
0
Weekly
0

himalaya-walk

Walk for himalaya's abstract syntax tree

Walking through the tree

The package provides a walk method. It allows you to recursively visit every node of the tree.

import {parse} from 'himalaya'
import walk from 'himalaya-walk'

const tree = parse('<div>foo</div>')
walk(tree, node => {
  console.log(node)
})

Keywords