@tinyhttp/cookie
Advanced tools
Comparing version 1.0.2 to 1.0.3
# @tinyhttp/cookie | ||
## 1.0.3 | ||
### Patch Changes | ||
- strip bytes | ||
## 1.0.2 | ||
@@ -4,0 +10,0 @@ |
@@ -68,13 +68,8 @@ const pairSplitRegExp = /; */; | ||
if (opt.path) { | ||
if (!fieldContentRegExp.test(opt.path)) { | ||
if (!fieldContentRegExp.test(opt.path)) | ||
throw new TypeError('option path is invalid'); | ||
} | ||
str += '; Path=' + opt.path; | ||
} | ||
if (opt.expires) { | ||
if (typeof opt.expires.toUTCString !== 'function') { | ||
throw new TypeError('option expires is invalid'); | ||
} | ||
if (opt.expires) | ||
str += '; Expires=' + opt.expires.toUTCString(); | ||
} | ||
if (opt.httpOnly) | ||
@@ -81,0 +76,0 @@ str += '; HttpOnly'; |
{ | ||
"name": "@tinyhttp/cookie", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "HTTP cookie parser and serializer for Node.js", |
@@ -96,5 +96,3 @@ const pairSplitRegExp = /; */ | ||
if (opt.path) { | ||
if (!fieldContentRegExp.test(opt.path)) { | ||
throw new TypeError('option path is invalid') | ||
} | ||
if (!fieldContentRegExp.test(opt.path)) throw new TypeError('option path is invalid') | ||
@@ -104,10 +102,4 @@ str += '; Path=' + opt.path | ||
if (opt.expires) { | ||
if (typeof opt.expires.toUTCString !== 'function') { | ||
throw new TypeError('option expires is invalid') | ||
} | ||
if (opt.expires) str += '; Expires=' + opt.expires.toUTCString() | ||
str += '; Expires=' + opt.expires.toUTCString() | ||
} | ||
if (opt.httpOnly) str += '; HttpOnly' | ||
@@ -114,0 +106,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20870
316