code: function extended(tag, range) {
    // 3.3.2.1
    var tags = lower(tag).split(dash)
    var ranges = lower(range).split(dash)
    var length = ranges.length
    var rangeIndex = -1
    var tagIndex = -1
  
    tag = tags[++tagIndex]
    range = ranges[++rangeIndex]
  
    // 3.3.2.2
    if (range !== asterisk && range !== tag) {
      return false
    }
  
    tag = tags[++tagIndex]
    range = ranges[++rangeIndex]
  
    // 3.3.2.3
    while (rangeIndex < length) {
      // 3.3.2.3.A
      if (range === asterisk) {
        range = ranges[++rangeIndex]
        continue
      }
  
      // 3.3.2.3.B
      if (!tag) {
        return false
      }
  
      // 3.3.2.3.C
      if (tag === range) {
        tag = tags[++tagIndex]
        range = ranges[++rangeIndex]
        continue
      }
  
      // 3.3.2.3.D
      if (tag.length === 1) {
        return false
      }
  
      // 3.3.2.3.E
      tag = tags[++tagIndex]
    }
  
    // 3.3.2.4
    return true
  }
docs: Extended Filtering (Section 3.3.2) matches a language priority list consisting of extended language ranges (Section 2.2) to sets of language tags.