code: function isNumStr(str, base = 10, radixPointOk = false) {
    if (typeof str != 'string' || !Number.isInteger(base)) throw new Error("in isNumStr, data type mismatch");
    if (base < 2 || base > consts.alphabet.length) throw new Error('in isNumStr, base out of range');
  
    // If the first character is a negative sign, ignore it when testing.
    let start = 0;
    if (str.charCodeAt(0) == consts.minus) start = 1;
  
    // Check each character of the string.
    let nPoints = 0;
    for (let i = start; i < str.length; i++) {
      // Detect any invalid characters.
      let code = str.charCodeAt(i);
      if (!isOkCharCode(code, base, radixPointOk)) return false;
      
      // If radix points are allowed, make sure there is only one.
      if (code == consts.point) {
        nPoints++;
        if (nPoints > 1) return false;
      }
    }
  
    // If you get this far, the string is ok.
    return true;
  }
docs: /* Check that a string represents a number in a given base.
  * False if the string contains invalid characters or too many radix points. True otherwise.
  * Case sensitivity is depedent on consts.caseSensitive. Negative values ok.
  *
  * @param {string} str - The string to be tested.
  * @param {number=} base - The base to use when testing.
  * @param {bool=} radixPointOk - True to allow fractional numbers, false to allow only integers.
  * @return {bool} True if the string represents a number in the specified base, false otherwise.