axios封装
@param  {Object} params       axios 的请求参数
@return {Promise}             返回一个Promise对象
513933
function request(params, ...args) {
    // 老接口ignoreError在args中传递，这里做兼容
    const ignoreError = params.ignoreError || args[0]
    // loading
    appStore.setLoading(true)
    return service(params).then(res => handleSuccess(res)).catch(error => handleError(error, ignoreError))
}
1348560
function(params){
        var allDataMatches = true;
        for(var k = 0; k < query[params.name].length; k++){
          var data = query[params.name][k];
          var operator = data.operator;
          var value = data.value;
          var field = data.field;
          var matches;
          
          if( operator != null && value != null ){
            
            var fieldVal = params.fieldValue(field);
            var fieldStr = !$$.is.string(fieldVal) && !$$.is.number(fieldVal) ? '' : '' + fieldVal;
            var valStr = '' + value;
            
            var caseInsensitive = false;
            if( operator.charAt(0) == '@' ){
              fieldStr = fieldStr.toLowerCase();
              valStr = valStr.toLowerCase();
              
              operator = operator.substring(1);
              caseInsensitive = true;
            }
            
            // if we're doing a case insensitive comparison, then we're using a STRING comparison
            // even if we're comparing numbers
            if( caseInsensitive ){
              value = valStr.toLowerCase();
              fieldVal = fieldStr.toLowerCase();
            }

            switch(operator){
            case '*=':
              matches = fieldStr.search(valStr) >= 0;
              break;
            case '$=':
              matches = new RegExp(valStr + '$').exec(fieldStr) != null;
              break;
            case '^=':
              matches = new RegExp('^' + valStr).exec(fieldStr) != null;
              break;
            case '=':
              matches = fieldVal === value;
              break;
            case '!=':
              matches = fieldVal !== value;
              break;
            case '>':
              matches = fieldVal > value;
              break;
            case '>=':
              matches = fieldVal >= value;
              break;
            case '<':
              matches = fieldVal < value;
              break;
            case '<=':
              matches = fieldVal <= value;
              break;
            default:
              matches = false;
              break;
              
            }
          } else if( operator != null ){
            switch(operator){
            case '?':
              matches = params.fieldTruthy(field);
              break;
            case '!':
              matches = !params.fieldTruthy(field);
              break;
            case '^':
              matches = params.fieldUndefined(field);
              break;
            }
          } else {   
            matches = !params.fieldUndefined(field);
          }
          
          if( !matches ){
            allDataMatches = false;
            break;
          }
        } // for
        
        return allDataMatches;
      }
919669
public function execute(array $params = []): Promise
    {
        $this->lastUsedAt = \time();

        return call(function () use ($params) {
            $statement = yield from $this->pop();
            \assert($statement instanceof Statement);

            try {
                $statement = yield $this->prepare($statement);
                \assert($statement instanceof Statement);
                $result = yield $statement->execute($params);
            } catch (\Throwable $exception) {
                $this->push($statement);
                throw $exception;
            }

            if ($result instanceof ResultSet) {
                $result = $this->createResultSet($result, function () use ($statement) {
                    $this->push($statement);
                });
            } else {
                $this->push($statement);
            }

            return $result;
        });
    }
91056
function promisedRequest(params, callback) {
  var deferred = Promise.defer();
  var req;
  var createRequest = function() {
    if (!req) {
      req = request(params, function(err, response) {
        if (err) {
          deferred.reject(err);
        } else {
          deferred.resolve(response);
        }
      });
    }
    return req;
  };
  return streamify(deferred.promise, createRequest).thenCall(callback);
}
370004
function fetch(publicAPI, model, name) {
  let fetchCallback = null;
  const requestQueue = [];

  publicAPI[`set${capitalize(name)}FetchCallback`] = (fetchMethod) => {
    if (requestQueue.length) {
      fetchMethod(requestQueue);
    }
    fetchCallback = fetchMethod;
  };

  return {
    addRequest(request) {
      requestQueue.push(request);
      if (fetchCallback) {
        fetchCallback(requestQueue);
      }
    },
    resetRequests(requestList) {
      while (requestQueue.length) {
        requestQueue.pop();
      }
      if (requestList) {
        // Rebuild request list
        requestList.forEach((req) => {
          requestQueue.push(req);
        });
        // Also trigger a request
        if (fetchCallback) {
          fetchCallback(requestQueue);
        }
      }
    },
  };
}
369764
function promisedSearch (params) {
  return new Promise((resolve, reject) => {
    customsearch.cse.list(params, function (err, resp) {
      if (err) {
        reject(err)
        return
      }

      resolve(resp)
    })
  })
}
668506
function loadWithPromise (options) {
  return new Promise((resolve, reject) => {
    loadWithCallback(options, (error, config) => {
      if (error) {
        reject(error)
      } else {
        resolve(config)
      }
    })
  })
}
983500
function(params) {
                            var clazz = this.getClazz();
                            return clazz(params.name, params.parent, params.deps)
                        }
759664
function HttpBackend() {
    this.requests = [];
    this.expectedRequests = [];
    const self = this;

    // All the promises our flush requests have returned. When all these promises are
    // resolved or rejected, there are no more flushes in progress.
    // For simplicity we never remove promises from this loop: this is a mock utility
    // for short duration tests, so this keeps it simpler.
    this._flushPromises = [];

    // the request function dependency that the SDK needs.
    this.requestFn = function(opts, callback) {
        const req = new Request(opts, callback);
        console.log(`${Date.now()} HTTP backend received request: ${req}`);
        self.requests.push(req);

        const abort = function() {
            const idx = self.requests.indexOf(req);
            if (idx >= 0) {
                console.log("Aborting HTTP request: %s %s", opts.method,
                            opts.uri);
                self.requests.splice(idx, 1);
                req.callback("aborted");
            }
        };

        return {
            abort: abort,
        };
    };

    // very simplistic mapping from the whatwg fetch interface onto the request
    // interface, so we can use the same mock backend for both.
    this.fetchFn = function(input, init) {
        init = init || {};
        const requestOpts = {
            uri: input,
            method: init.method || 'GET',
            body: init.body,
        };

        return new Promise((resolve, reject) => {
            function callback(err, response, body) {
                if (err) {
                    reject(err);
                }
                resolve({
                    ok: response.statusCode >= 200 && response.statusCode < 300,
                    json: () => JSON.parse(body),
                });
            };

            const req = new Request(requestOpts, callback);
            console.log(`HTTP backend received request: ${req}`);
            self.requests.push(req);
        });
    };
}
473884
function(params){
            var object = {};
            if(typeof params === 'string'){

                params.replace('?', '').split('&').forEach(function(kv){
                    var pair = kv.split('=');
                    if(pair.length === 2){
                        object[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
                    }
                });
            } else {
                object = params;
            }
            return this.plainObject(object);
        }
1197260
function(params){
    service.token = service.token || {};      // init the token
    angular.extend(service.token, params);      // set the access token params
    setTokenInSession();                // save the token into the session
    setExpiresAtEvent();                // event to fire when the token expires

    return service.token;
  }
742006
function (route, parameters) {

        return new Promise((resolve, reject) => {

            request.get({
                url: baseUrl + route + '?' + querystring.stringify(parameters)
            }, (error, response, body) => {

                if (error) {
                    reject(error);
                } else if (response && body) {
                    var result;

                    try {
                        result = JSON.parse(body);
                    } catch (e) {
                        reject(e);
                    }

                    if (result.error == 'Method not allowed') {
                        this._post(route, parameters).then(
                            res => { resolve(res) },
                            err => { reject(err) }
                        );
                    } else {
                        resolve(result);
                    }
                } else {
                    reject(response);
                }
            });
        });
    }
81081
function (params) {
  const oThis = this
  ;

  params = params || {};
  oThis.passphrase = params.passphrase || '';
  oThis.chain = params.chain;
}
882270
function reqUpdate (req, params) {
  return [ req.params.__feathersId || null, req.body, params ];
}
906955
function url(line, params) {

  var event = params[0];
  var what = params[1];
  try {
    event[line[what]][line.method][line.status].counter++;
  } catch (TypeError) {
    if (event[line[what]] === undefined) {
      event[line[what]] = Object.create(null);
    }
    if (event[line[what]][line.method] === undefined) {
      event[line[what]][line.method] = Object.create(null);
    }
    if (event[line[what]][line.method][line.status] === undefined) {
      event[line[what]][line.method][line.status] = {
        counter: 1
      };
    }
  }
  return event;
}
1206233
function (req, res, options) {
    if (!options) {
      options = {};
    }
    options.operation = 'FIND';
    options.res = res;
    exports.find.before(req, res, options);
    vulpejs.models.find({
      model: req.params.model,
      populate: req.params.populate,
      history: true,
      id: req.params.id || false,
      query: req.params.query || {
        _id: req.params.id,
      },
      callback: {
        success: function (data) {
          exports.find.after(req, res, data);
          if (options && options.callback) {
            vulpejs.utils.execute(options.callback, {
              item: data.item,
              history: data.history,
              res: res,
            });
          } else {
            res.json(data);
          }
        },
        error: function (error) {
          exports.response.error(options, error);
        },
      },
    })
  }
123794
function(options) {
        if (!this.id)
          return Promise.reject(new Error('The status id is not exists.'));
        var request = AVRequest('statuses', null, this.id, 'DELETE', options);
        return request;
      }