docs: function (pattern) {
              if (!pattern) {
                  pattern = this._format;
              }
  
              var typeUtil = ariaUtilsType;
              if (typeUtil.isFunction(pattern)) {
                  pattern = pattern();
              }
  
              if (!typeUtil.isString(pattern)) {
                  return;
              }
  
              // check if it's already in cache
              var res = this._cache[pattern];
              if (res) {
                  return res;
              }
  
              var tokens = this._validCurrency.exec(pattern);
  
              if (tokens) {
                  res = {
                      currencyBegin : !!tokens[1],
                      currencyEnd : !!tokens[4],
                      integer : tokens[2],
                      decimal : tokens[3] || "" // decimal is optional
                  };
  
                  // Compute the minimum number of characters needed for the integer part
                  var stripped = res.integer.replace(/,/g, "");
                  var indexOfZero = stripped.indexOf("0");
  
                  res.minIntLen = indexOfZero > -1 ? stripped.length - indexOfZero : 0;
                  res.hasGrouping = stripped.length != res.integer.length;
                  if (res.hasGrouping) {
                      if (res.integer.length - stripped.length === 1) {
                          // There is only one comma
                          res.regularGroup = res.integer.length - res.integer.indexOf(",") - 1;
                      } else {
                          // There are more commas, excluing the first token, check if there is a simple pattern
                          var patterns = res.integer.split(",");
                          var initialPattern = res.integer.length - res.integer.lastIndexOf(",") - 1;
                          for (var i = 1, len = patterns.length; i < len; i += 1) {
                              if (patterns[i].length != initialPattern) {
                                  initialPattern = 0;
                                  break;
                              }
                          }
                          res.regularGroup = initialPattern;
                      }
                  }
  
                  // do the same for the decimal part
                  res.minDecLen = res.decimal.lastIndexOf("0") + 1;
                  // maxDecLen is limited to 20 to prevent rangeError when using toFixed (precision is lost before that anyway)
                  res.maxDecLen = res.decimal.length > 20 ? 20 : res.decimal.length;
              }
  
              this._cache[pattern] = res;
              return res;
          }