code: function uniqueMatch(string, regexp) {
    const results = [];
    let match;
  
    while ((match = regexp.exec(string))) {
      results.push({
        context: match[0],
        match: match[1] || ''
      });
    }
  
    // Filter duplicates
    return unique(results, isEqual);
  }
docs: Match unique occurrences in 'string'
  @param {String} string
  @param {RegExp} regexp
  @returns {Array}