Skip to content

parse

parse(cookie?, options?): object

Defined in: lib/cookie/parse.js:65

Parses a Cookie header string into a key-value map.

string = ''

Raw value of the Cookie HTTP header

Parser configuration

boolean = true

Aggregate duplicate names into arrays

Function = ...

Transform applied to each [name, value] pair

boolean = false

Use RFC 2109 (lenient) instead of RFC 6265 (strict) parsing

number = 50

Maximum number of cookies; throws on excess

object

  • Plain object of cookie name → value (or string[])

If max is exceeded