public/javascripts/yui/cookie/cookie.js
function (hash /*:Object*/) /*:String*/ {
        
        //shortcuts
        var lang = YAHOO.lang;
        
        if (!lang.isObject(hash)){
            throw new TypeError("Cookie._createCookieHashString(): Argument must be an object.");
        }
        
        var text /*:Array*/ = [];
        
        for (var key in hash){
            if (lang.hasOwnProperty(hash, key) && !lang.isFunction(hash[key]) && !lang.isUndefined(hash[key])){
                text.push(encodeURIComponent(key) + "=" + encodeURIComponent(String(hash[key])));
            }
        }
        
        return text.join("&");
    }
function (hash /*:Object*/) /*:String*/ {
        
        //shortcuts
        var lang = YAHOO.lang;
        
        if (!lang.isObject(hash)){
            throw new TypeError("Cookie._createCookieHashString(): Argument must be an object.");
        }
        
        var text /*:Array*/ = [];
        
        for (var key in hash){
            if (lang.hasOwnProperty(hash, key) && !lang.isFunction(hash[key]) && !lang.isUndefined(hash[key])){
                text.push(encodeURIComponent(key) + "=" + encodeURIComponent(String(hash[key])));
            }
        }
        
        return text.join("&");
    }
function ( hash /*:Object*/ ) /*:String*/ { //shortcuts var lang = YAHOO . lang ; if ( ! lang . isObject ( hash ) ) { throw new TypeError ( "Cookie._createCookieHashString(): Argument must be an object." ) ; } var text /*:Array*/ = [ ] ; for ( var key in hash ) { if ( lang . hasOwnProperty ( hash , key ) && ! lang . isFunction ( hash [ key ] ) && ! lang . isUndefined ( hash [ key ] ) ) { text . push ( encodeURIComponent ( key ) + "=" + encodeURIComponent ( String ( hash [ key ] ) ) ) ; } } return text . join ( "&" ) ; }
Formats a cookie value for an object containing multiple values.
@param {Object} hash An object of key-value pairs to create a string for.
@return {String} A string suitable for use as a cookie value.
@method _createCookieHashString
@private
@static
Formats a cookie value for an object containing multiple values .