return (tree) => { // Remove the first heading so as to not duplicate // the automatically generated one. return remove(tree, (node, index) => { return !index && node.type === 'heading'; }); };
app.removeByType = function removeByType (node, type) { node = remove(node, function (n) { return n.type === type }) }