diff options
author | Yasser A.Idrissi <spookyframework@gmail.com> | 2020-11-21 16:53:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-21 16:53:23 +0100 |
commit | 692322cc2818a7ee573aecff98f2e0f08972b389 (patch) | |
tree | a0ad3c95badaaca753d8a4502fc13d8a42bc9e92 | |
parent | ec7f1e399e1c1d74bf7af060a21010138de208df (diff) |
refactor(std/http): Rename validateCookieName param name & JSDoc (#8451)
-rw-r--r-- | std/http/cookie.ts | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/std/http/cookie.ts b/std/http/cookie.ts index f8025d328..90f33ae98 100644 --- a/std/http/cookie.ts +++ b/std/http/cookie.ts @@ -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}".`); } } |