summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYasser A.Idrissi <spookyframework@gmail.com>2020-11-21 16:53:23 +0100
committerGitHub <noreply@github.com>2020-11-21 16:53:23 +0100
commit692322cc2818a7ee573aecff98f2e0f08972b389 (patch)
treea0ad3c95badaaca753d8a4502fc13d8a42bc9e92
parentec7f1e399e1c1d74bf7af060a21010138de208df (diff)
refactor(std/http): Rename validateCookieName param name & JSDoc (#8451)
-rw-r--r--std/http/cookie.ts11
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}".`);
}
}