function normalizeEvents(events, rtn, prefix) {
        rtn = rtn || {};
        if (prefix) {
            prefix += ':';
        } else {
            prefix = '';
        }
        var value, valueType;
        for (var key in events) {
            if (events.hasOwnProperty(key)) {
                value = events[key];
                valueType = typeof value;
                if (valueType === 'string' || valueType === 'function') {
                    rtn[prefix + key] = value;
                } else if (value) {
                    normalizeEvents(value, rtn, prefix + key);
                }
            }
        }
        return rtn;
    }
function normalizeEvents(events, rtn, prefix) {
        rtn = rtn || {};
        if (prefix) {
            prefix += ':';
        } else {
            prefix = '';
        }
        var value, valueType;
        for (var key in events) {
            if (events.hasOwnProperty(key)) {
                value = events[key];
                valueType = typeof value;
                if (valueType === 'string' || valueType === 'function') {
                    rtn[prefix + key] = value;
                } else if (value) {
                    normalizeEvents(value, rtn, prefix + key);
                }
            }
        }
        return rtn;
    }
function normalizeEvents ( events , rtn , prefix ) { rtn = rtn || { } ; if ( prefix ) { prefix += ':' ; } else { prefix = '' ; } var value , valueType ; for ( var key in events ) { if ( events . hasOwnProperty ( key ) ) { value = events [ key ] ; valueType = typeof value ; if ( valueType === 'string' || valueType === 'function' ) { rtn [ prefix + key ] = value ; } else if ( value ) { normalizeEvents ( value , rtn , prefix + key ) ; } } } return rtn ; }
Allow events to be referenced in a hierarchical structure.  All parts in the
hierarchy will be appended together using ":" as the separator
window: {
scroll: 'onScroll',
resize: 'onResize'
}
will return as
{
'window:scroll': 'onScroll',
'window:resize': 'onResize'
}
}
Allow events to be referenced in a hierarchical structure . All parts in the hierarchy will be appended together using : as the separator window : { scroll : onScroll resize : onResize } will return as { window : scroll : onScroll window : resize : onResize } }