export function filterChildrenBetween(doc, from, to, predicate) {
  var results = [];
  doc.nodesBetween(from, to, function (node, pos, _parent) {
    if (predicate(node, pos, _parent)) {
      results.push({
        node: node,
        pos: pos
      });
    }
  });
  return results;
}