index.js
function Rorschach(connectionString, options) {
  EventEmitter.call(this);

  options = options || {};

  var retryPolicy = options.retryPolicy;
  if (retryPolicy instanceof RetryPolicy) {
    this.retryPolicy = retryPolicy;
  }
  else {
    this.retryPolicy = new RetryPolicy(retryPolicy);
  }

  // Initial state
  this.state = ConnectionState.LOST;

  initZooKeeper(this, connectionString, options.zookeeper);
}
function Rorschach(connectionString, options) {
  EventEmitter.call(this);

  options = options || {};

  var retryPolicy = options.retryPolicy;
  if (retryPolicy instanceof RetryPolicy) {
    this.retryPolicy = retryPolicy;
  }
  else {
    this.retryPolicy = new RetryPolicy(retryPolicy);
  }

  // Initial state
  this.state = ConnectionState.LOST;

  initZooKeeper(this, connectionString, options.zookeeper);
}
function Rorschach ( connectionString , options ) { EventEmitter . call ( this ) ; options = options || { } ; var retryPolicy = options . retryPolicy ; if ( retryPolicy instanceof RetryPolicy ) { this . retryPolicy = retryPolicy ; } else { this . retryPolicy = new RetryPolicy ( retryPolicy ) ; } // Initial state this . state = ConnectionState . LOST ; initZooKeeper ( this , connectionString , options . zookeeper ) ; }
Create instance and connect to ZooKeeper.

@constructor
@extends {events.EventEmitter}
@param {String} connectionString ZooKeeper connection string
@param {Object} [options] Options:
@param {Object|RetryPolicy} [options.retryPolicy] RetryPolicy instance or options
@param {Object} [options.zookeeper] ZooKeeper client options
Create instance and connect to ZooKeeper .