src/debug/registry_wrapper.js
function RegistryWrapper(obj, type) {
  this.obj = obj;
  this.type = type;

  this.selected = false;
  this.collapsed = false;
  this.customEvents = [];

  this.debugName = obj.getDebugName();

  if (obj.el) {
    this.elString = Object.prototype.toString.call(obj.el);
  }

  if (typeof obj.getFunctions === 'function') {
    this.trackedFunctions = {};
    this.objectFunctions = obj.getFunctions(this.trackedFunctions, getTrackableFunction);
  }

  // Add history tracking to top level views
  if (type === 'views' && typeof obj.getState === 'function' && !obj.parentView) {
    this.state = new StateHistory(obj);
  }

  if (typeof obj.getEvents === 'function') {
    this.objectEvents = obj.getEvents();
  }

  _.bindAll(this, 'isParent', 'getChildren');
}
function RegistryWrapper(obj, type) {
  this.obj = obj;
  this.type = type;

  this.selected = false;
  this.collapsed = false;
  this.customEvents = [];

  this.debugName = obj.getDebugName();

  if (obj.el) {
    this.elString = Object.prototype.toString.call(obj.el);
  }

  if (typeof obj.getFunctions === 'function') {
    this.trackedFunctions = {};
    this.objectFunctions = obj.getFunctions(this.trackedFunctions, getTrackableFunction);
  }

  // Add history tracking to top level views
  if (type === 'views' && typeof obj.getState === 'function' && !obj.parentView) {
    this.state = new StateHistory(obj);
  }

  if (typeof obj.getEvents === 'function') {
    this.objectEvents = obj.getEvents();
  }

  _.bindAll(this, 'isParent', 'getChildren');
}
function RegistryWrapper ( obj , type ) { this . obj = obj ; this . type = type ; this . selected = false ; this . collapsed = false ; this . customEvents = [ ] ; this . debugName = obj . getDebugName ( ) ; if ( obj . el ) { this . elString = Object . prototype . toString . call ( obj . el ) ; } if ( typeof obj . getFunctions === 'function' ) { this . trackedFunctions = { } ; this . objectFunctions = obj . getFunctions ( this . trackedFunctions , getTrackableFunction ) ; } // Add history tracking to top level views if ( type === 'views' && typeof obj . getState === 'function' && ! obj . parentView ) { this . state = new StateHistory ( obj ) ; } if ( typeof obj . getEvents === 'function' ) { this . objectEvents = obj . getEvents ( ) ; } _ . bindAll ( this , 'isParent' , 'getChildren' ) ; }
Object to wrap Tungsten adaptor objects
Allows us to modify data without risk of overriding adaptor properties

@param {Object} obj  Adaptor object to wrap
@param {string} type Type of wrapped object
Object to wrap Tungsten adaptor objects Allows us to modify data without risk of overriding adaptor properties