docs: function format(str, obj) {
  
      if (obj instanceof Array) {
          var i = 0, len = obj.length;
          //find the matches
          return str.replace(FORMAT_REGEX, function (m, format, type) {
              var replacer, ret;
              if (i < len) {
                  replacer = obj[i++];
              } else {
                  //we are out of things to replace with so
                  //just return the match?
                  return m;
              }
              if (m === "%s" || m === "%d" || m === "%D") {
                  //fast path!
                  ret = replacer + "";
              } else if (m === "%Z") {
                  ret = replacer.toUTCString();
              } else if (m === "%j") {
                  try {
                      ret = JSON.stringify(replacer);
                  } catch (e) {
                      throw new Error("comb.string.format : Unable to parse json from ", replacer);
                  }
              } else {
                  format = format.replace(/^\[|\]$/g, "");
                  switch (type) {
                  case "s":
                      ret = formatString(replacer, format);
                      break;
                  case "d":
                      ret = formatNumber(replacer, format);
                      break;
                  case "j":
                      ret = formatObject(replacer, format);
                      break;
                  case "D":
                      ret = getDate().date.format(replacer, format);
                      break;
                  case "Z":
                      ret = getDate().date.format(replacer, format, true);
                      break;
                  }
              }
              return ret;
          });
      } else if (isHash(obj)) {
          return str.replace(INTERP_REGEX, function (m, format, value) {
              value = obj[value];
              if (!misc.isUndefined(value)) {
                  if (format) {
                      if (comb.isString(value)) {
                          return formatString(value, format);
                      } else if (typeof value === "number") {
                          return formatNumber(value, format);
                      } else if (getDate().isDate(value)) {
                          return getDate().date.format(value, format);
                      } else if (typeof value === "object") {
                          return formatObject(value, format);
                      }
                  } else {
                      return "" + value;
                  }
              }
              return m;
          });
      } else {
          var args = pSlice.call(arguments).slice(1);
          return format(str, args);
      }
  }