src/console/simpleyui.js
function(fn, context) {
        // unsubscribe handle
        if (fn && fn.detach) {
            return fn.detach();
        }

        var i, s,
            found = 0, 
            subs  = Y.merge(this.subscribers, this.afters);

        for (i in subs) {
            if (subs.hasOwnProperty(i)) {
                s = subs[i];
                if (s && (!fn || fn === s.fn)) {
                    this._delete(s);
                    found++;
                }
            }
        }

        return found;
    }
function(fn, context) {
        // unsubscribe handle
        if (fn && fn.detach) {
            return fn.detach();
        }

        var i, s,
            found = 0, 
            subs  = Y.merge(this.subscribers, this.afters);

        for (i in subs) {
            if (subs.hasOwnProperty(i)) {
                s = subs[i];
                if (s && (!fn || fn === s.fn)) {
                    this._delete(s);
                    found++;
                }
            }
        }

        return found;
    }
function ( fn , context ) { // unsubscribe handle if ( fn && fn . detach ) { return fn . detach ( ) ; } var i , s , found = 0 , subs = Y . merge ( this . subscribers , this . afters ) ; for ( i in subs ) { if ( subs . hasOwnProperty ( i ) ) { s = subs [ i ] ; if ( s && ( ! fn || fn === s . fn ) ) { this . _delete ( s ) ; found ++ ; } } } return found ; }
Detach listeners.
@method detach
@param {Function} fn  The subscribed function to remove, if not supplied
all will be removed
@param {Object}   context The context object passed to subscribe.
@return {int} returns the number of subscribers unsubscribed
Detach listeners .