0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 17:34:47 -05:00

refactor(std/http): Rename validateCookieName param name & JSDoc (#8451)

This commit is contained in:
Yasser A.Idrissi 2020-11-21 16:53:23 +01:00 committed by GitHub
parent ec7f1e399e
commit 692322cc28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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