bin/play.js
function writeCookie (response, cookiePath) {
  try {
    debug('got response')
    var cookies = cookie.parse(response.headers['set-cookie'][0])
    debug('connect.sid', cookies['connect.sid'])
    fs.writeFileSync(cookiePath, JSON.stringify(cookies))
  } catch (e) {
    debug(e)
  }
}
function writeCookie (response, cookiePath) {
  try {
    debug('got response')
    var cookies = cookie.parse(response.headers['set-cookie'][0])
    debug('connect.sid', cookies['connect.sid'])
    fs.writeFileSync(cookiePath, JSON.stringify(cookies))
  } catch (e) {
    debug(e)
  }
}
function writeCookie ( response , cookiePath ) { try { debug ( 'got response' ) var cookies = cookie . parse ( response . headers [ 'set-cookie' ] [ 0 ] ) debug ( 'connect.sid' , cookies [ 'connect.sid' ] ) fs . writeFileSync ( cookiePath , JSON . stringify ( cookies ) ) } catch ( e ) { debug ( e ) } }
Write a cookie to file.
@param  {object} response   The express response object.
@param  {string} cookiePath The path to the cookie file.
Write a cookie to file .