Encode to a Cookie header value (i.e.
Encode to a Cookie header value (i.e. the .key and .value properties joined with '=').
Sets the expiry based on a date-string passed through parseDate().
Sets the expiry based on a date-string passed through parseDate(). If parseDate returns null (i.e. can't parse this date string), .expires is set to "Infinity" (a string) is set.
Sets the maxAge in seconds.
Sets the maxAge in seconds. Coerces -Infinity to "-Infinity" and Infinity to "Infinity" so it JSON serializes correctly.
Tough-Cookie
https://www.npmjs.com/package/tough-cookie