code: function(key) {
    var error;
  
    if (typeof key !== "string") {
      error = "key must be a string";
    }
    else if (key.length === 0) {
      error = "key cannot be the empty string";
    }
    else if (1 + g_GEOHASH_PRECISION + key.length > 755) {
      // Wilddog can only stored child paths up to 768 characters
      // The child path for this key is at the least: "i/<geohash>key"
      error = "key is too long to be stored in Wilddog";
    }
    else if (/[\[\].#$\/\u0000-\u001F\u007F]/.test(key)) {
      // Wilddog 不允许key包含如下字符
      error = "key cannot contain any of the following characters: . # $ ] [ /";
    }
  
    if (typeof error !== "undefined") {
      throw new Error("Invalid WildGeo key '" + key + "': " + error);
    }
  }
docs: 校验输入的key，如果不合法抛出错误
  @param {string} key 被校验的key