lib/message.js
function Message () {

  if (!(this instanceof Message)) {
    if (typeof arguments[0] === 'object' && arguments[0] instanceof Message) {
      debug('message is a message so return it');
      return arguments[0];
    }
    else {
      debug('creating new message and initializing with arguments');
      var m = new Message();
      Message.prototype.initialize.apply(m, slice.call(arguments));
      return m;
    }
  }
  else {
    this.isMessage = true;
    if (arguments.length) {
      debug('initializing with arguments');
      Message.prototype.initialize.apply(this, slice.call(arguments));
    }
  }

}
function Message () {

  if (!(this instanceof Message)) {
    if (typeof arguments[0] === 'object' && arguments[0] instanceof Message) {
      debug('message is a message so return it');
      return arguments[0];
    }
    else {
      debug('creating new message and initializing with arguments');
      var m = new Message();
      Message.prototype.initialize.apply(m, slice.call(arguments));
      return m;
    }
  }
  else {
    this.isMessage = true;
    if (arguments.length) {
      debug('initializing with arguments');
      Message.prototype.initialize.apply(this, slice.call(arguments));
    }
  }

}
function Message ( ) { if ( ! ( this instanceof Message ) ) { if ( typeof arguments [ 0 ] === 'object' && arguments [ 0 ] instanceof Message ) { debug ( 'message is a message so return it' ) ; return arguments [ 0 ] ; } else { debug ( 'creating new message and initializing with arguments' ) ; var m = new Message ( ) ; Message . prototype . initialize . apply ( m , slice . call ( arguments ) ) ; return m ; } } else { this . isMessage = true ; if ( arguments . length ) { debug ( 'initializing with arguments' ) ; Message . prototype . initialize . apply ( this , slice . call ( arguments ) ) ; } } }
A message represents an action performed by an actor on target with the content
A message represents an action performed by an actor on target with the content