jshttp / cookie

HTTP server cookie parsing and serialization
MIT License
1.36k stars 159 forks source link

Add stringify method to mirror parse #214

Open blakeembrey opened 2 days ago

blakeembrey commented 2 days ago

Part of the work from https://github.com/jshttp/cookie/issues/200, adding methods that mirror the existing methods so someone can easily understand parse/stringify and (in another PR) serialize/deserialize.

wesleytodd commented 2 days ago

I think it would help if we had more documentation on this, maybe a description for the PR to clarify? The code looks like the goal is to take the output from cookie.parse and turn it back into a cookie header string? And I assume by the comment about "and in another pr seralize/desearlize" that there will be a follow up PR to add deseralize to parse set-cookie headers?

blakeembrey commented 1 day ago

Yes.

wesleytodd commented 1 day ago

Sorry, to which question?

blakeembrey commented 1 day ago

Yes to all of them.