export default function(compare) { return this.eachBefore(function(node) { if (node.children) { node.children.sort(compare); } }); }