Skip to content

Commit

Permalink
Update parse return type
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey authored Oct 8, 2024
1 parent 90dd8e0 commit a56d27f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export interface ParseOptions {
export function parse(
str: string,
options?: ParseOptions,
): Record<string, string> {
const obj: Record<string, string> = new NullObject();
): Record<string, string | undefined> {
const obj: Record<string, string | undefined> = new NullObject();
const len = str.length;
// RFC 6265 sec 4.1.1, RFC 2616 2.2 defines a cookie name consists of one char minimum, plus '='.
if (len < 2) return obj;
Expand Down

0 comments on commit a56d27f

Please sign in to comment.