code: function charToVal(char) {
    if (typeof char != 'string' || char.length != 1) throw new Error('in charToVal, invalid argument');
  
    if (consts.caseSensitive) return consts.alphabet.indexOf(char);
  
    let code = char.charCodeAt(0);
    let val = -1;
    for (let i = 0; i < consts.alphabet.length; i++) {
      let okCode = consts.alphabet[i].charCodeAt(0);
      if (code == okCode || code == changeCase(okCode)) {
        val = i;
        break;
      }
    }
    return val;
  }
docs: /* Return the value of a character according to the current alphabet or -1 if the character is invalid.
  *