lib/Slave.js
/**
 * True if the message recieved is a "slave message", or one sent by a slave process.
 * @param {Object} m The message data.
 * @return {Boolean} True if the message is a slave message, false otherwise.
 */
True if the message recieved is a "slave message", or one sent by a slave process.
@param {Object} m The message data.
@return {Boolean} True if the message is a slave message, false otherwise.
True if the message recieved is a " slave message " or one sent by a slave process . @param { Object } m The message data . @return { Boolean } True if the message is a slave message false otherwise .
function isSlaveMessage(m) {
  if (
    typeof m === 'object'
    && m[SECRET_ID] === SECRET_NUMBER
    && m.sent
    && m.title === 'SlaveIOResponse'
    && typeof m.request === 'object'
  ) {
    if (typeof m.request.for === 'number'
      && typeof m.request.rid === 'number'
      && typeof m.request.command === 'string'
    ) {
      return true;
    }
  }
  return false;
}
function isSlaveMessage ( m ) { if ( typeof m === 'object' && m [ SECRET_ID ] === SECRET_NUMBER && m . sent && m . title === 'SlaveIOResponse' && typeof m . request === 'object' ) { if ( typeof m . request . for === 'number' && typeof m . request . rid === 'number' && typeof m . request . command === 'string' ) { return true ; } } return false ; }
True if the message recieved is a "slave message", or one sent by a slave process.
True if the message recieved is a " slave message " or one sent by a slave process .