text: const matches = require('matches-selector');
  
  module.exports = function(element, selector) {
    do {
      if (matches(element, selector)) {
        return element;
      }
    } while ((element = element.parentNode) && element.nodeType === 1);
  };
  
  