* Finds an immediate child with the specified label, creates a child * node if necessary. * * @param {string} label Child node label.
(label)
| 1221 | * @param {string} label Child node label. |
| 1222 | */ |
| 1223 | findOrAddChild(label) { |
| 1224 | const found = this.findChild(label) |
| 1225 | if (found === null) return this.addChild(label); |
| 1226 | return found; |
| 1227 | } |
| 1228 | |
| 1229 | /** |
| 1230 | * Calls the specified function for every child. |