code: function Duplicator() {
  
      this.duplicateComponent = function(component) {
          const visitor = new DuplicatingVisitor();
          component.acceptVisitor(visitor);
          return visitor.result;
      };
  
      return this;
  }
docs: PUBLIC CONSTRUCTORS 
  This class implements a duplicator that uses a visitor to create a deep copy of a
  component. Since elements are immutable, they are not copied, only referenced.
  
  @constructor
  @returns {Duplicator} The new component duplicator.