jrpc.js
function expose(subject, callback) {
  var name;

  if (!this.active) {
    return this;
  }

  if (typeof subject === 'string') {
    this.localComponents[subject] = true;
    this.exposed[subject] = callback;
  } else if (typeof subject === 'object') {
    for (name in subject) {
      if (subject.hasOwnProperty(name)) {
        this.localComponents[name] = true;
        this.exposed[name] = subject[name];
      }
    }
  }

  return this;
}
function expose(subject, callback) {
  var name;

  if (!this.active) {
    return this;
  }

  if (typeof subject === 'string') {
    this.localComponents[subject] = true;
    this.exposed[subject] = callback;
  } else if (typeof subject === 'object') {
    for (name in subject) {
      if (subject.hasOwnProperty(name)) {
        this.localComponents[name] = true;
        this.exposed[name] = subject[name];
      }
    }
  }

  return this;
}
function expose ( subject , callback ) { var name ; if ( ! this . active ) { return this ; } if ( typeof subject === 'string' ) { this . localComponents [ subject ] = true ; this . exposed [ subject ] = callback ; } else if ( typeof subject === 'object' ) { for ( name in subject ) { if ( subject . hasOwnProperty ( name ) ) { this . localComponents [ name ] = true ; this . exposed [ name ] = subject [ name ] ; } } } return this ; }
Server side 
Expose a single or collection of methods to remote end

@param {(Object|String)}      subject    Name of method or direct object
@param {JRPC~serviceCallback} [callback] Callback to handle requests

@return {JRPC} This instance, for chaining
Server side Expose a single or collection of methods to remote end