This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
/* 批处理脚本 */
/*
如果有processTree,则先运行prcessTree,如果有返回,则进行后面的针对每个节点运行processNode
如果没有定义processTree,则直接针对每个节点运行processNode
*/
({
processTree: (tree) => {
console.log(`processTree ${tree.name}`);
if (tree.name == "hero") {
return tree;
}
},
processNode: (node, tree) => {
console.log(`processNode ${tree.name}.${node.id}`);
})