From 692322cc2818a7ee573aecff98f2e0f08972b389 Mon Sep 17 00:00:00 2001 From: "Yasser A.Idrissi" Date: Sat, 21 Nov 2020 16:53:23 +0100 Subject: [PATCH] refactor(std/http): Rename validateCookieName param name & JSDoc (#8451) --- std/http/cookie.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/std/http/cookie.ts b/std/http/cookie.ts index f8025d3287..90f33ae983 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}".`); } }