0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -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.
* @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}".`);
}
}