1 2 3 4 5 6 7
export default function(compare) { return this.eachBefore(function(node) { if (node.children) { node.children.sort(compare); } }); }