MCPcopy Index your code
hub / github.com/posthtml/posthtml / walk

Function walk

lib/api.js:38–40  ·  view source on GitHub ↗

* Walks the tree and passes all nodes via a callback * * @memberof tree * * @param {Function} cb Callback * @return {Function} Callback(node) * *@example * ```js * export const walk = (tree) => { * tree.walk((node) => { * let classes = node.attrs && node.attrs.class.split(' ')

(cb)

Source from the content-addressed store, hash-verified

36 * ```
37 */
38function walk (cb) {
39 return traverse(this, cb)
40}
41
42/**
43 * Matches an expression to search for nodes in the tree

Callers

nothing calls this directly

Calls 1

traverseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…