import getAncestors from "./getAncestors";
export default (function (parent, target) {
  var ancestors = getAncestors(target);
  if (ancestors.length === 0) return false;
  return ancestors.some(function (node) {
    return node === parent;
  });
});