Files
NapCatQQ/.pnpm-store/v3/files/4b/8571510d892516c1b92469a4c0b1cffbefad35e3f7043b9f11077df91667962099e9001fdfe89fd8cbc8560933413450998fa14e2f664cbefccdcfdc1460c7
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

19 lines
395 B
Plaintext

module.exports = function walk(nodes, cb, bubble) {
var i, max, node, result
for (i = 0, max = nodes.length; i < max; i += 1) {
node = nodes[i]
if (!bubble) {
result = cb(node, i, nodes)
}
if (result !== false && node.type === 'function' && Array.isArray(node.nodes)) {
walk(node.nodes, cb, bubble)
}
if (bubble) {
cb(node, i, nodes)
}
}
}