docs: function stemmer(value) {
    var firstCharacterWasLowerCaseY
    var match
  
    value = String(value).toLowerCase()
  
    // Exit early.
    if (value.length < 3) {
      return value
    }
  
    // Detect initial `y`, make sure it never matches.
    if (value.charCodeAt(0) === 121 /* y */) {
      firstCharacterWasLowerCaseY = true
      value = 'Y' + value.substr(1)
    }
  
    // Step 1a.
    if (sfxSsesOrIes.test(value)) {
      // Remove last two characters.
      value = value.substr(0, value.length - 2)
    } else if (sfxS.test(value)) {
      // Remove last character.
      value = value.substr(0, value.length - 1)
    }
  
    // Step 1b.
    if ((match = sfxEED.exec(value))) {
      if (gt0.test(match[1])) {
        // Remove last character.
        value = value.substr(0, value.length - 1)
      }
    } else if ((match = sfxEdOrIng.exec(value)) && vowelInStem.test(match[1])) {
      value = match[1]
  
      if (sfxAtOrBlOrIz.test(value)) {
        // Append `e`.
        value += 'e'
      } else if (sfxMultiConsonantLike.test(value)) {
        // Remove last character.
        value = value.substr(0, value.length - 1)
      } else if (consonantLike.test(value)) {
        // Append `e`.
        value += 'e'
      }
    }
  
    // Step 1c.
    if ((match = sfxY.exec(value)) && vowelInStem.test(match[1])) {
      // Remove suffixing `y` and append `i`.
      value = match[1] + 'i'
    }
  
    // Step 2.
    if ((match = step2.exec(value)) && gt0.test(match[1])) {
      value = match[1] + step2list[match[2]]
    }
  
    // Step 3.
    if ((match = step3.exec(value)) && gt0.test(match[1])) {
      value = match[1] + step3list[match[2]]
    }
  
    // Step 4.
    if ((match = step4.exec(value))) {
      if (gt1.test(match[1])) {
        value = match[1]
      }
    } else if ((match = sfxIon.exec(value)) && gt1.test(match[1])) {
      value = match[1]
    }
  
    // Step 5.
    if (
      (match = sfxE.exec(value)) &&
      (gt1.test(match[1]) ||
        (eq1.test(match[1]) && !consonantLike.test(match[1])))
    ) {
      value = match[1]
    }
  
    if (sfxLl.test(value) && gt1.test(value)) {
      value = value.substr(0, value.length - 1)
    }
  
    // Turn initial `Y` back to `y`.
    if (firstCharacterWasLowerCaseY) {
      value = 'y' + value.substr(1)
    }
  
    return value
  }