code: function isConnected(a, b){
      while (b && b !== a && b !== b.delegate)
        b = b.delegate;
  
      return b === a;
    }
docs: Returns true if object is connected to another object through delegate chain.
  @param {basis.data.Object} a
  @param {basis.data.Object} b
  @return {boolean} Whether objects are connected.