lib/ServerEvents.js
/**
 * Determines if the given message "m" is an init message.
 * @param {Object} m A socket message.
 * @return {Boolean|Array} Returns false if not, or the arguments from the init message if true.
 */
Determines if the given message "m" is an init message.
@param {Object} m A socket message.
@return {Boolean|Array} Returns false if not, or the arguments from the init message if true.
Determines if the given message " m " is an init message . @param { Object } m A socket message . @return { Boolean|Array } Returns false if not or the arguments from the init message if true .
function isInitMessageGetArgsOrFalse(m) {
  if (typeof m === 'object'
    && typeof m.count === 'number'
    && typeof m.path === 'string'
    && typeof m.options === 'object'
    && m.options.args instanceof Array
  ) {
    const args = minimist(m.options.args, { number: ['dist-io-slave-id'] });
    return args;
  }
  return false;
}
function isInitMessageGetArgsOrFalse ( m ) { if ( typeof m === 'object' && typeof m . count === 'number' && typeof m . path === 'string' && typeof m . options === 'object' && m . options . args instanceof Array ) { const args = minimist ( m . options . args , { number : [ 'dist-io-slave-id' ] } ) ; return args ; } return false ; }
Determines if the given message "m" is an init message.
Determines if the given message " m " is an init message .