docs: function checkDepends(query, data, topData) {
    if (query === undefined || data === undefined) return false;
    if (query === null) return false;
    if (query === '') return false;
    if (typeof query === 'boolean') return query;
    if (typeof query === 'string') {
      if (query[0] === '!') {
        //反向
        query = query.substr(1);
        return !data[query];
      }
      return !!data[query];
    }
    topData = topData || data;
    return _.every(query, function (test, key) {
      // 值是引用
      test = getRef(test, topData);
  
      if (key === '$and') {
        if (!_.isArray(test)) {
          throw new Error('$and must be an array');
        }
        return _.every(test, function (v) {
          return checkDepends(v, data, topData);
        });
      } else if (key === '$or') {
        if (!_.isArray(test)) {
          throw new Error('$or must be an array');
        }
        return _.find(test, function (v) {
          return checkDepends(v, data, topData);
        });
      } else if (key === '$nor') {
        if (!_.isArray(test)) {
          throw new Error('$nor must be an array');
        }
        return !_.find(test, function (v) {
          return checkDepends(v, data, topData);
        });
      } else if (key === '$jsonSchema') {
        if (!test || typeof test !== 'object' || _.isArray(test)) {
          throw new Error('$jsonSchema must be an object');
        }
        return ajv.validate(test, data);
      } else if (key[0] === '$') {
        throw new Error('unsupported top level operator: ' + key);
      }
  
      test = checkRegExp(test);
      var value = _.get(data, key);
  
      if (isExpression(test)) {
        // 表达式对象
        return checkValue(value, test, topData);
      }
  
      if (_.isArray(value) && !_.isArray(test)) {
        return findArrayElement(value, test, topData);
      }
  
      if (typeof value === 'string' && test instanceof RegExp) {
        return test.test(value);
      }
  
      return _.isEqual(test, value);
    });
  }