Skip to content

Commit

Permalink
refactor(http): Rename validateCookieName param name & JSDoc (denolan…
Browse files Browse the repository at this point in the history
  • Loading branch information
getspooky authored and caspervonb committed Jan 31, 2021
1 parent 2c9869a commit 53df2d8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions http/cookie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,12 @@ function toString(cookie: Cookie): string {
}

/**
* Validate Cookie property.
* @param key Name of the cookie.
* @param value Value of the cookie.
* Validate Cookie Name.
* @param name Cookie name.
*/
function validateCookieName(value: string | undefined | null): void {
if (value && !FIELD_CONTENT_REGEXP.test(value)) {
throw new TypeError(`Invalid cookie name: "${value}".`);
function validateCookieName(name: string | undefined | null): void {
if (name && !FIELD_CONTENT_REGEXP.test(name)) {
throw new TypeError(`Invalid cookie name: "${name}".`);
}
}

Expand Down

0 comments on commit 53df2d8

Please sign in to comment.