cookies icon indicating copy to clipboard operation
cookies copied to clipboard

inspect() implementation

Open tj opened this issue 11 years ago • 6 comments

which parses would be pretty sweet

tj avatar Apr 11 '14 21:04 tj

can you clarify?

jonathanong avatar May 07 '14 21:05 jonathanong

right now you just get a bunch of internal props, but it would be nice to display what you're really looking for. AFAIK there's no way to return them all right now

tj avatar May 07 '14 21:05 tj

what info are you looking for? 1.0.0 will only show .req and .res. not sure if you want to hide those either.

or did you just want something less noisy?

jonathanong avatar Jun 19 '14 03:06 jonathanong

I think this is about http://nodejs.org/api/util.html#util_util_inspect_object_options where you add a inspect method to Cookie (https://github.com/expressjs/cookies/blob/rewrite/lib/cookie.js). Probably something like inspect: function(){ return this.toHeader() } for when you call util.inspect(cookie).

dougwilson avatar Jun 19 '14 03:06 dougwilson

Ya but cookie is private. Heh

jonathanong avatar Jun 19 '14 03:06 jonathanong

Ah, yea. Glancing though the new code, I don't particularly see anything to inspect from the outside.

dougwilson avatar Jun 19 '14 04:06 dougwilson