validateNumber(number, base = 10) {
    var isComma = false;
    var digits = number.toString().split("");

    // Loop throught the received number and check every digit for its validness
    for (let i in digits) {
      let digitValue = Base.getDigitValue(digits[i]);

      if (digits[i] === "," && isComma === false) isComma = true;

      if (digits[i] === "," && isComma === true) return false;

      if (digitValue === -1 || digitValue >= base) return false;
    }

    // Return true if number is 0 so the call-site can make safe boolean checks
    return number ? number : true;
  }
/** Takes a number and validates it
   * Returns true if argument is a number in the corresponding base, false if not
   */
Takes a number and validates it
Returns true if argument is a number in the corresponding base, false if not
Takes a number and validates it Returns true if argument is a number in the corresponding base false if not
validateNumber(number, base = 10) {
    var isComma = false;
    var digits = number.toString().split("");
    for (let i in digits) {
      let digitValue = Base.getDigitValue(digits[i]);
      if (digits[i] === "," && isComma === false) isComma = true;
      if (digits[i] === "," && isComma === true) return false;
      if (digitValue === -1 || digitValue >= base) return false;
    }
    return number ? number : true;
  }
validateNumber ( number , base = 10 ) { var isComma = false ; var digits = number . toString ( ) . split ( "" ) ; for ( let i in digits ) { let digitValue = Base . getDigitValue ( digits [ i ] ) ; if ( digits [ i ] === "," && isComma === false ) isComma = true ; if ( digits [ i ] === "," && isComma === true ) return false ; if ( digitValue === - 1 || digitValue >= base ) return false ; } return number ? number : true ; }
Takes a number and validates it
 Returns true if argument is a number in the corresponding base, false if not
Takes a number and validates it Returns true if argument is a number in the corresponding base false if not
// Loop throught the received number and check every digit for its validness // Return true if number is 0 so the call-site can make safe boolean checks