cookie-es icon indicating copy to clipboard operation
cookie-es copied to clipboard

Parse multiple cookies with same name

Open pi0 opened this issue 1 year ago • 0 comments

Describe the feature

Background: https://github.com/jshttp/cookie/issues/60 (found it in an issue reported by @atinux)

Incoming cookie value can have the same name repeated and we pick the first.

We can allow them in two possible ways:

  • { sameKeysPolicy: 'last' } as proposed in https://github.com/jshttp/cookie/issues/60
  • { multiple: true } that makes return type Record<string, string | string[]>
  • { multiple: true } that concatinates multiple values with ,

pi0 avatar Sep 03 '24 13:09 pi0