code: function(name) {
  
          if (!YAHOO.lang.isString(name) || name === ""){
              throw new TypeError("Cookie.exists(): Cookie name must be a non-empty string.");
          }
  
          var cookies /*:Object*/ = this._parseCookieString(document.cookie, true);
          
          return cookies.hasOwnProperty(name);
      }
docs: ------------------------------------------------------------------------- Public Methods ------------------------------------------------------------------------- 
  Determines if the cookie with the given name exists. This is useful for
  Boolean cookies (those that do not follow the name=value convention).
  @param {String} name The name of the cookie to check.
  @return {Boolean} True if the cookie exists, false if not.
  @method exists
  @static