function(method,klass){
    while(!!klass){
        var key = null,
            pro = klass.prototype;
        // find method in current klass
        Object.keys(pro).some(function(name){
            if (method===pro[name]){
                key = name;
                return !0;
            }
        });
        // method finded in klass
        if (key!=null){
            return {
                name:key,
                klass:klass
            };
        }
        klass = klass.supor;
    }
}
function(method,klass){
    while(!!klass){
        var key = null,
            pro = klass.prototype;
        // find method in current klass
        Object.keys(pro).some(function(name){
            if (method===pro[name]){
                key = name;
                return !0;
            }
        });
        // method finded in klass
        if (key!=null){
            return {
                name:key,
                klass:klass
            };
        }
        klass = klass.supor;
    }
}
function ( method , klass ) { while ( ! ! klass ) { var key = null , pro = klass . prototype ; // find method in current klass Object . keys ( pro ) . some ( function ( name ) { if ( method === pro [ name ] ) { key = name ; return ! 0 ; } } ) ; // method finded in klass if ( key != null ) { return { name : key , klass : klass } ; } klass = klass . supor ; } }
find method in klass prototype chain
find method in klass prototype chain