index.js
function isFinished (msg) {
  var socket = msg.socket

  if (typeof msg.finished === 'boolean') {
    // OutgoingMessage
    return Boolean(msg.finished || (socket && !socket.writable))
  }

  if (typeof msg.complete === 'boolean') {
    // IncomingMessage
    return Boolean(msg.upgrade || !socket || !socket.readable || (msg.complete && !msg.readable))
  }

  // don't know
  return undefined
}
function isFinished (msg) {
  var socket = msg.socket

  if (typeof msg.finished === 'boolean') {
    // OutgoingMessage
    return Boolean(msg.finished || (socket && !socket.writable))
  }

  if (typeof msg.complete === 'boolean') {
    // IncomingMessage
    return Boolean(msg.upgrade || !socket || !socket.readable || (msg.complete && !msg.readable))
  }

  // don't know
  return undefined
}
function isFinished ( msg ) { var socket = msg . socket if ( typeof msg . finished === 'boolean' ) { // OutgoingMessage return Boolean ( msg . finished || ( socket && ! socket . writable ) ) } if ( typeof msg . complete === 'boolean' ) { // IncomingMessage return Boolean ( msg . upgrade || ! socket || ! socket . readable || ( msg . complete && ! msg . readable ) ) } // don't know return undefined }
Determine if message is already finished.

@param {object} msg
@return {boolean}
@public
Determine if message is already finished .