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:
parent
ec7f1e399e
commit
692322cc28
1 changed files with 5 additions and 6 deletions
|
@ -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}".`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue