按类别和参数数组获取 mock 数据
@param {Number} format - 数据模型的类型
@param {Array} params - 参数数组
@param {String} [name] - 参数字段名
@param {Array} [traversePath] - 遍历路径
336809
function (format, params, name, traversePath) {
      this._sortParams(params);
      traversePath = traversePath || [];
      switch (format) {
        case 0: // 哈希
          var result = {};
          var pathNodeNum = null;
          params.forEach(function (param) {
            pathNodeNum = traversePath.length;
            if (!param.ignored) {//如果有忽略则不显示范例
              result[param.name] = this._getMockByParam(param, traversePath);
            }
            traversePath.length = pathNodeNum;
          }, this);
          return result;
        case 1: // 枚举
          return this._getEnumMock(params);
        case 2: // 数组
          // params[0] 存的是数组元素的类型
          return this._getArrayMockByArrEleType(params[0], 3, traversePath);
        case 3: // 字符
        case 4: // 数值
        case 5: // 布尔
          var sysDatatype = {
            id: format == 3 ? 10001 : format == 4 ? 10002 : 10003,
            name: name
          };
          if (params.length == 1) {
            // 自定义类型, 要考虑默认值和生成规则
            // 系统类型的 params 参数为空数组
            var param = params[0];
            sysDatatype = Object.assign(sysDatatype, {
              defaultValue: param.defaultValue,
              genExpression: param.genExpression
            });
          }
          return this._getMockOfSysDatatype(sysDatatype);
        case 6: // 文件
          return '<File>';
        default:
          break;
      }
    }
718175
public void warnv(String format, Object param1, Object param2, Object param3) {
        if (isEnabled(Level.WARN)) {
            doLog(Level.WARN, FQCN, format, new Object[] { param1, param2, param3 }, null);
        }
    }
834812
function noformat(app, file, locals, argv) {
  return app.isTrue('noformat') || app.isFalse('format')
    || file.noformat === true || file.format === false
    || locals.noformat === true || locals.format === false
    || argv.noformat === true || argv.format === false;
}
947445
public void errorf(String format, Object... params) {
        doLogf(Level.ERROR, FQCN, format, params, null);
    }
1311206
function format(formatStr) {
    var args = [];
    for (var _i = 1; _i < arguments.length; _i++) {
        args[_i - 1] = arguments[_i];
    }
    return formatArray(formatStr, args);
}
925352
function formatParams_(params) {
  var query = '';
  if (params) {
    params.f = params.f || 'json';
    for (var x in params) {
      if (params.hasOwnProperty(x) && params[x] !== null && params[x] !== undefined) { // wont sent undefined.
        //jslint complaint about escape cause NN does not support it.
        var val = formatRequestString_(params[x]); 
        query += (query.length > 0?'&':'')+(x + '=' + (escape ? escape(val) : encodeURIComponent(val)));
      }
    }
  }
  return query;
}
630683
public void logv(Level level, String format, Object... params) {
        doLog(level, FQCN, format, params, null);
    }
24495
public void debugf(Throwable t, String format, Object... params) {
        doLogf(Level.DEBUG, FQCN, format, params, t);
    }
249713
function addFormat(name, format) {
  if (typeof format == 'string') format = new RegExp(format);
  this._formats[name] = format;
  return this;
}
514615
function get(params){
    var path = params.path;
    var config = params.config;

    if (path instanceof Route)
      return path;

    var route;
    // If there is no config specified - it should be a plain route, so we try to reuse it
    if (!config)
      route = plainRoutesByPath[path];

    if (!route && params.autocreate)
    {
      var parseInfo = Object.prototype.toString.call(path) == '[object RegExp]'
        ? { path: path, regexp: path, ast: null, params: [] }
        : parsePath(path);
      route = createRoute(parseInfo, config);
      allRoutes.push(route);

      if (route instanceof ParametrizedRoute == false)
        plainRoutesByPath[path] = route;

      if (typeof currentPath == 'string')
      {
        var flags = route.processLocation_(currentPath);

        if (flags & ROUTE_ENTER)
          routeEnter(route);
        if (flags & ROUTE_MATCH)
          routeMatch(route);
      }
    }

    return route;
  }
410129
def _extract_object_params(self, name):
        

        params = self.request.query_params.lists()
        params_map = {}
        prefix = name[:-1]
        offset = len(prefix)
        for name, value in params:
            if name.startswith(prefix):
                if name.endswith('}'):
                    name = name[offset:-1]
                elif name.endswith('}[]'):
                    # strip off trailing []
                    # this fixes an Ember queryparams issue
                    name = name[offset:-3]
                else:
                    # malformed argument like:
                    # filter{foo=bar
                    raise exceptions.ParseError(
                        '"%s" is not a well-formed filter key.' % name
                    )
            else:
                continue
            params_map[name] = value

        return params_map
305047
function setPathParamsFromArray(data, config, idx) {
  // only write parameters if they are not already defined in config
  if (data.requestData === undefined || config.pathParams) {
    return data;
  }
  // if we have requestData, fill the path params accordingly
  var mockParameters = {};

  data.pathParameters.forEach(function(parameter) {
    // find the mock data for this parameter name
    mockParameters[parameter.name] = data.requestData.filter(function(mock) {
      return mock.hasOwnProperty(parameter.name);
    })[idx][parameter.name];
  });
  data.pathParams = mockParameters;
  return data;
}
806819
function traverse(util, searchTerm, options) {
      options = options || {};
      var obj = options.obj || window;
      var path = options.path || ((obj == window) ? 'window' : '');
      var props = Object.keys(obj);
      props.forEach(function(prop) {
        if ((tests[util] || util)(searchTerm, obj, prop)) {
          console.log([path, '.', prop].join(''), '->', ['(', typeof obj[prop], ')'].join(''), obj[prop]);
        }
        if (Object.prototype.toString.call(obj[prop]) == '[object Object]' && (obj[prop] != obj) && path.split('.').indexOf(prop) == -1) {
          traverse(util, searchTerm, {obj: obj[prop], path: [path,prop].join('.')});
        }
      });
    }
1280656
def format(format_string, params)
      format_string.gsub(/\%(?:\{(.*?)\})?>?([a-zA-Z%])/){
         param, spec = $1, $2
         case spec[0]
         when ?e, ?i, ?n, ?o
           raise AccessLogError,
             "parameter is required for \"#{spec}\"" unless param
           (param = params[spec][param]) ? escape(param) : "-"
         when ?t
           params[spec].strftime(param || CLF_TIME_FORMAT)
         when ?p
           case param
           when 'remote'
             escape(params["i"].peeraddr[1].to_s)
           else
             escape(params["p"].to_s)
           end
         when ?%
           "%"
         else
           escape(params[spec].to_s)
         end
      }
    end
1201708
function formatParameters(params)
{
    var sortedKeys = [],
        formattedParams = ''

    // sort the properties of the parameters
    sortedKeys = _.keys(params).sort()

    // create a string of key value pairs separated by '&' with '=' assignement
    for (i = 0; i < sortedKeys.length; i++)
    {
        if (i !== 0) {
            formattedParams += '&'
        }
        formattedParams += sortedKeys[i] + '=' + params[sortedKeys[i]]
    }

    return formattedParams
}
984691
public void errorf(Throwable t, String format, Object... params) {
        doLogf(Level.ERROR, FQCN, format, params, t);
    }
427518
function(styleName, path, format) {
    const uri = this.getStylePath(styleName, path, format);
    const scheme = this.getScheme(uri);

    if (PUBLIC === scheme || TEMPORARY === scheme) {
      return '/' + this.resolvePath(uri);
    }

    throw new Error('Scheme `' + scheme + '` not supported');
  }