index.js
function hash(sess) {
  // serialize
  var str = JSON.stringify(sess, function (key, val) {
    // ignore sess.cookie property
    if (this === sess && key === 'cookie') {
      return
    }

    return val
  })

  // hash
  return crypto
    .createHash('sha1')
    .update(str, 'utf8')
    .digest('hex')
}
function hash(sess) {
  // serialize
  var str = JSON.stringify(sess, function (key, val) {
    // ignore sess.cookie property
    if (this === sess && key === 'cookie') {
      return
    }

    return val
  })

  // hash
  return crypto
    .createHash('sha1')
    .update(str, 'utf8')
    .digest('hex')
}
function hash ( sess ) { // serialize var str = JSON . stringify ( sess , function ( key , val ) { // ignore sess.cookie property if ( this === sess && key === 'cookie' ) { return } return val } ) // hash return crypto . createHash ( 'sha1' ) . update ( str , 'utf8' ) . digest ( 'hex' ) }
Hash the given `sess` object omitting changes to `.cookie`.

@param {Object} sess
@return {String}
@private
Hash the given sess object omitting changes to . cookie .