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

17 lines
462 B
Plaintext

"use strict";
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);
}
}
};