ability to clear cookie
expose a method in the API to clear/expire a cookie
like how they do here http://expressjs.com/api.html#res.clearCookie
+1 really needed feature
Please feel free to make a PR if you are looking for the feature soon.
Would setting maxAge to -1 not do it?
Even setting maxAge to 0 will work; I think the ask here is to have an API that is clear that the operation is to clear the cookie, instead of needed everyone to understand that setting a cookie that will immediately expire will do that.
@dougwilson Looking at the code, I think setting maxAge to 0 won't work as 0 is falsey - setting it to 0 means that it will be ignored. The code here does:
if (this.maxAge) this.expires = new Date(Date.now() + this.maxAge);
Waitting to add destory function to cookie.