index.js
function parse(packet) {
    if ('object' === typeof packet) return packet;

    try { return JSON.parse(packet); }
    catch (e) { return failed(e); }
  }
function parse(packet) {
    if ('object' === typeof packet) return packet;

    try { return JSON.parse(packet); }
    catch (e) { return failed(e); }
  }
function parse ( packet ) { if ( 'object' === typeof packet ) return packet ; try { return JSON . parse ( packet ) ; } catch ( e ) { return failed ( e ) ; } }
Parse the packet.

@param {String} packet The encoded message.
@returns {Object}
@api private
Parse the packet .