code: function decInt(str, base = 10) {
    if (!isNumStr(str, base)) throw new Error('in decInt, str is not an integer in the given base');
    let minus = String.fromCharCode(consts.minus);
  
    let rec = rectify(str);
  
    // If the rectified value is negative, call increment on the absolute value.
    if (rec[0] == minus) {
      let inc = incInt(rec.slice(1), base);
      return (minus + inc);
    }
  
    // Find the first character from the right that is not zero.
    // This is the character to decrement.
    let decIndex = -1;
    for (let i = rec.length - 1; i >= 0; i--) {
      if (rec[i] != consts.alphabet[0]) {
        decIndex = i;
        break;
      }
    }
  
    // If all characters are found to be zero, the decremented value is -1.
    if (decIndex < 0) return minus + consts.alphabet[1];
  
    // Decrement the appropriate character.
    let decrementedChar = decChar(rec[decIndex], base);
    let dec = rec.slice(0, decIndex) + decrementedChar;
  
    // Reset all lesser character places to the maximal character for the given base.
    let maximalChar = consts.alphabet[base - 1];
    dec = dec.padEnd(rec.length, maximalChar);
  
    // Rectify in case the decremented character left a leading zero.
    dec = rectify(dec);
  
    return dec;
  }
docs: /* Decrement an integer string in a given base.
  *