public/javascripts/yui/cookie/cookie.js
function (name, subName, converter) {
        
        var lang = YAHOO.lang,
            hash = this.getSubs(name);
        
        if (hash !== null) {
            
            if (!lang.isString(subName) || subName === ""){
                throw new TypeError("Cookie.getSub(): Subcookie name must be a non-empty string.");
            }
            
            if (lang.isUndefined(hash[subName])){
                return null;
            }
            
            if (!lang.isFunction(converter)){
                return hash[subName];
            } else {
                return converter(hash[subName]);
            }
        } else {
            return null;
        }
    
    }
function (name, subName, converter) {
        
        var lang = YAHOO.lang,
            hash = this.getSubs(name);
        
        if (hash !== null) {
            
            if (!lang.isString(subName) || subName === ""){
                throw new TypeError("Cookie.getSub(): Subcookie name must be a non-empty string.");
            }
            
            if (lang.isUndefined(hash[subName])){
                return null;
            }
            
            if (!lang.isFunction(converter)){
                return hash[subName];
            } else {
                return converter(hash[subName]);
            }
        } else {
            return null;
        }
    
    }
function ( name , subName , converter ) { var lang = YAHOO . lang , hash = this . getSubs ( name ) ; if ( hash !== null ) { if ( ! lang . isString ( subName ) || subName === "" ) { throw new TypeError ( "Cookie.getSub(): Subcookie name must be a non-empty string." ) ; } if ( lang . isUndefined ( hash [ subName ] ) ) { return null ; } if ( ! lang . isFunction ( converter ) ) { return hash [ subName ] ; } else { return converter ( hash [ subName ] ) ; } } else { return null ; } }
Returns the value of a subcookie.
@param {String} name The name of the cookie to retrieve.
@param {String} subName The name of the subcookie to retrieve.
@param {Function} converter (Optional) A function to run on the value before returning
it. The function is not used if the cookie doesn't exist.
@return {Variant} If the cookie doesn't exist, null is returned. If the subcookie
doesn't exist, null if also returned. If no converter is specified and the
subcookie exists, a string is returned. If a converter is specified and the
subcookie exists, the value returned from the converter is returned.
@method getSub
@static
Returns the value of a subcookie .