Skip to content

Commit 2000ca2

Browse files
committed
Undo cookie type rename
1 parent e1947ba commit 2000ca2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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
*/
152152
export function stringifyCookie(
153-
cookie: Cookie,
153+
cookie: Cookies,
154154
options?: StringifyOptions,
155155
): string {
156156
const enc = options?.encode || encodeURIComponent;

0 commit comments

Comments
 (0)