function check (message) {
  if (!message) {
    return Promise.reject(new Error('Argument must not be falsy!'))
  }

  if (typeof message !== 'string') {
    return Promise.reject(new Error('Argument must be a string!'))
  }

  return Promise.resolve(message)
}
function check (message) {
  if (!message) {
    return Promise.reject(new Error('Argument must not be falsy!'))
  }

  if (typeof message !== 'string') {
    return Promise.reject(new Error('Argument must be a string!'))
  }

  return Promise.resolve(message)
}
function check ( message ) { if ( ! message ) { return Promise . reject ( new Error ( 'Argument must not be falsy!' ) ) } if ( typeof message !== 'string' ) { return Promise . reject ( new Error ( 'Argument must be a string!' ) ) } return Promise . resolve ( message ) }
@module @lobsangnet/lobsang-connect-matrix/check
 
Checks the message on type etc.

@private
@param {String} message - The message to send.
@returns {Promise<String|Error>}
Promise which resolved to a cleaned message.
Or an Error if rejected.
@module @lobsangnet / lobsang - connect - matrix / check Checks the message on type etc .