Skip to content

Commit 6d52dbc

Browse files
committed
Merge pull request TrySound#18 from MadLittleMods/update-readme-bubble-walk-immediate
Update valueParser.walk docs
2 parents f80cfc7 + 88facd5 commit 6d52dbc

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,15 @@ Stringifies node and array of nodes.
109109

110110
### valueParser.walk(nodes, cb[, bubble])
111111

112-
Walks each node and recursively each nodes of functions.
113-
If bubble is `false` and callback returns `false` on function node then deeper walking will be prevented.
112+
Walks each provided node, recursively for each node in a function.
113+
114+
Returning `false` in the callback will prevent traversal of deeper, nested nodes(inside a function). You can use this to walk over only the immediate children. *note: This only applies if `bubble` is `false`(default).*
115+
114116
Returns `this` instance.
115117

116-
- `nodes` - value-parser node or nodes
117-
- `cb(node, index, nodes)`
118-
- `bubble` walk since the deepest functions nodes
118+
- `nodes`: `value-parser` node or nodes
119+
- `cb(node, index, nodes)`: function - Function to execute for each node
120+
- `bubble`: boolean - Walk from the deepest nodes upwards
119121

120122
### var p = valueParser(value)
121123

0 commit comments

Comments
 (0)