I'm using js-cookie:
It's easy to set a cookie, but I'm unclear how to output specific values and test against them. This works fine:
Cookies.set('newsletter', 'show', { expires: 30, path: '/' });
var myCookie = Cookies.get('newsletter');
But this does not:
if(myCookie){
var p = Cookies.get(['expires']);
document.write(p);
}
How do I access the expires property?
According to this issue it is not possible
Also in the FAQ it states the same thing: