"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.filterChildrenBetween = filterChildrenBetween;
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;
}