unist utility to visit nodes.
npm install unist-util-visit
var u =var visit =var tree =
type: 'leaf' value: '1'type: 'leaf' value: '2'type: 'leaf' value: '3'
visit(tree[, test], visitor[, reverse])
This function works exactly the same as
visitor has a different signature.
next? = visitor(node, index, parent)
Otherwise the same as
visit, but with a stack of parents
unist-util-filter— Create a new tree with all nodes that pass a test
unist-util-map— Create a new tree with all nodes mapped by a given function
unist-util-flatmap— Create a new tree by mapping (to an array) with the provided function and then flattening
unist-util-remove— Remove nodes from a tree that pass a test
unist-util-select— Select nodes with CSS-like selectors
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.