public/javascripts/yui/cookie/cookie.js
function (name /*:String*/, value /*:Object*/, options /*:Object*/) /*:String*/ {
        
        var lang = YAHOO.lang;
        
        if (!lang.isString(name)){
            throw new TypeError("Cookie.setSubs(): Cookie name must be a string.");
        }
        
        if (!lang.isObject(value)){
            throw new TypeError("Cookie.setSubs(): Cookie value must be an object.");
        }
        
        var text /*:String*/ = this._createCookieString(name, this._createCookieHashString(value), false, options);
        document.cookie = text;
        return text;
    }
function (name /*:String*/, value /*:Object*/, options /*:Object*/) /*:String*/ {
        
        var lang = YAHOO.lang;
        
        if (!lang.isString(name)){
            throw new TypeError("Cookie.setSubs(): Cookie name must be a string.");
        }
        
        if (!lang.isObject(value)){
            throw new TypeError("Cookie.setSubs(): Cookie value must be an object.");
        }
        
        var text /*:String*/ = this._createCookieString(name, this._createCookieHashString(value), false, options);
        document.cookie = text;
        return text;
    }
function ( name /*:String*/ , value /*:Object*/ , options /*:Object*/ ) /*:String*/ { var lang = YAHOO . lang ; if ( ! lang . isString ( name ) ) { throw new TypeError ( "Cookie.setSubs(): Cookie name must be a string." ) ; } if ( ! lang . isObject ( value ) ) { throw new TypeError ( "Cookie.setSubs(): Cookie value must be an object." ) ; } var text /*:String*/ = this . _createCookieString ( name , this . _createCookieHashString ( value ) , false , options ) ; document . cookie = text ; return text ; }
Sets a cookie with a given name to contain a hash of name-value pairs.
@param {String} name The name of the cookie to set.
@param {Object} value An object containing name-value pairs.
@param {Object} options (Optional) An object containing one or more
cookie options: path (a string), domain (a string), expires (a Date object),
and secure (true/false).
@return {String} The created cookie string.
@method setSubs
@static
Sets a cookie with a given name to contain a hash of name - value pairs .