src/Node.js
function publish (channel, ...args) {
    if (!isString(channel)) throw new TypeError(`${_debugStr}: .publish(channel, [...args]) channel MUST be a string`)
    if (~internalChannels.indexOf(channel)) {
      console.warn(`${_debugStr} channel '${channel}' is used internally and you cannot publish in it`)
      return node
    }
    if (!_pubConnection.connected) {
      console.warn(`${_debugStr} cannot publish on bus.`)
      return node
    }
    _pubConnection.publish(channel, ...args)
    return node
  }
function publish (channel, ...args) {
    if (!isString(channel)) throw new TypeError(`${_debugStr}: .publish(channel, [...args]) channel MUST be a string`)
    if (~internalChannels.indexOf(channel)) {
      console.warn(`${_debugStr} channel '${channel}' is used internally and you cannot publish in it`)
      return node
    }
    if (!_pubConnection.connected) {
      console.warn(`${_debugStr} cannot publish on bus.`)
      return node
    }
    _pubConnection.publish(channel, ...args)
    return node
  }
function publish ( channel , ... args ) { if ( ! isString ( channel ) ) throw new TypeError ( ` ${ _debugStr } ` ) if ( ~ internalChannels . indexOf ( channel ) ) { console . warn ( ` ${ _debugStr } ${ channel } ` ) return node } if ( ! _pubConnection . connected ) { console . warn ( ` ${ _debugStr } ` ) return node } _pubConnection . publish ( channel , ... args ) return node }
Sends a message through the bus, published on a particular channel
@param  {string} channel
@param  {array} args
@return {object} node instance
Sends a message through the bus published on a particular channel