lib/cookies.js
function createJSCookie (key, value, options = {}) {
  return [
    encodeURIComponent(key), '=', value,
    options.expires
      ? `; expires=${options.expires}`
      : '',
    options.path
      ? `; path=${options.path}`
      : '',
    options.domain
      ? `; domain=${options.domain}`
      : '',
    options.secure
      ? '; secure'
      : ''
  ].join('');
}
function createJSCookie (key, value, options = {}) {
  return [
    encodeURIComponent(key), '=', value,
    options.expires
      ? `; expires=${options.expires}`
      : '',
    options.path
      ? `; path=${options.path}`
      : '',
    options.domain
      ? `; domain=${options.domain}`
      : '',
    options.secure
      ? '; secure'
      : ''
  ].join('');
}
function createJSCookie ( key , value , options = { } ) { return [ encodeURIComponent ( key ) , '=' , value , options . expires ? ` ${ options . expires } ` : '' , options . path ? ` ${ options . path } ` : '' , options . domain ? ` ${ options . domain } ` : '' , options . secure ? '; secure' : '' ] . join ( '' ) ; }
takes arguments given and creates a JavaScript Cookie
takes arguments given and creates a JavaScript Cookie