code: function matchDirectChild(nodes, predicate) {
    return uniqueReduce(
      (matches, node) => matches.concat(childrenOfNode(node).filter(predicate)),
      nodes,
    );
  }
docs: Matches only nodes which are direct children (not grandchildren, etc.)
  against a predicate, returning those that match.
  @param {Array<Node>} nodes
  @param {Function} predicate