index.js
function onmessage(packet) {
    if (arguments.length === 2) packet = arguments[1];
    packet = parse(packet);

    if (allowed(packet)) emit(packet);
  }
function onmessage(packet) {
    if (arguments.length === 2) packet = arguments[1];
    packet = parse(packet);

    if (allowed(packet)) emit(packet);
  }
function onmessage ( packet ) { if ( arguments . length === 2 ) packet = arguments [ 1 ] ; packet = parse ( packet ) ; if ( allowed ( packet ) ) emit ( packet ) ; }
Handle incomming messages.

@param {String} packet The message
@api private
Handle incomming messages .