File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,16 +92,16 @@ export interface ParseOptions {
9292/**
9393 * Cookies object.
9494 */
95- export type Cookie = Record < string , string | undefined > ;
95+ export type Cookies = Record < string , string | undefined > ;
9696
9797/**
9898 * Parse a `Cookie` header.
9999 *
100100 * Parse the given cookie header string into an object
101101 * The object has the various cookies as keys(names) => values
102102 */
103- export function parseCookie ( str : string , options ?: ParseOptions ) : Cookie {
104- const obj : Cookie = new NullObject ( ) ;
103+ export function parseCookie ( str : string , options ?: ParseOptions ) : Cookies {
104+ const obj : Cookies = new NullObject ( ) ;
105105 const len = str . length ;
106106 // RFC 6265 sec 4.1.1, RFC 2616 2.2 defines a cookie name consists of one char minimum, plus '='.
107107 if ( len < 2 ) return obj ;
@@ -150,7 +150,7 @@ export interface StringifyOptions {
150150 * Stringifies an object into an HTTP `Cookie` header.
151151 */
152152export function stringifyCookie (
153- cookie : Cookie ,
153+ cookie : Cookies ,
154154 options ?: StringifyOptions ,
155155) : string {
156156 const enc = options ?. encode || encodeURIComponent ;
You can’t perform that action at this time.
0 commit comments