code: function parseNumber(num) {
      var numStr = Math.abs(num) + '';
      var exponent = 0, digits, integerLen;
      var i, j, zeros;
      // Decimal point?
      if ((integerLen = numStr.indexOf(DECIMAL_SEP)) > -1) {
          numStr = numStr.replace(DECIMAL_SEP, '');
      }
      // Exponential form?
      if ((i = numStr.search(/e/i)) > 0) {
          // Work out the exponent.
          if (integerLen < 0)
              integerLen = i;
          integerLen += +numStr.slice(i + 1);
          numStr = numStr.substring(0, i);
      }
      else if (integerLen < 0) {
          // There was no decimal point or exponent so it is an integer.
          integerLen = numStr.length;
      }
      // Count the number of leading zeros.
      for (i = 0; numStr.charAt(i) === ZERO_CHAR; i++) { /* empty */
      }
      if (i === (zeros = numStr.length)) {
          // The digits are all zero.
          digits = [0];
          integerLen = 1;
      }
      else {
          // Count the number of trailing zeros
          zeros--;
          while (numStr.charAt(zeros) === ZERO_CHAR)
              zeros--;
          // Trailing zeros are insignificant so ignore them
          integerLen -= i;
          digits = [];
          // Convert string to array of digits without leading/trailing zeros.
          for (j = 0; i <= zeros; i++, j++) {
              digits[j] = Number(numStr.charAt(i));
          }
      }
      // If the number overflows the maximum allowed digits then use an exponent.
      if (integerLen > MAX_DIGITS) {
          digits = digits.splice(0, MAX_DIGITS - 1);
          exponent = integerLen - 1;
          integerLen = 1;
      }
      return { digits: digits, exponent: exponent, integerLen: integerLen };
  }
docs: Parses a number.
  Significant bits of this parse algorithm came from https://github.com/MikeMcl/big.js/