@whatwg-node/cookie-store
Advanced tools
Comparing version 0.2.0 to 0.2.1-rc-20230710182705-1e8ffff
@@ -33,2 +33,3 @@ "use strict"; | ||
domain: null, | ||
httpOnly: false, | ||
}; | ||
@@ -105,2 +106,3 @@ if (typeof init === 'string') { | ||
domain: null, | ||
httpOnly: false, | ||
}; | ||
@@ -107,0 +109,0 @@ if (typeof init === 'string') { |
@@ -16,2 +16,5 @@ "use strict"; | ||
} | ||
else if (item.expires) { | ||
cookieString += '; Expires=' + item.expires.toUTCString(); | ||
} | ||
if ((item.name && item.name.startsWith('__Secure')) || item.secure) { | ||
@@ -32,4 +35,7 @@ item.sameSite = 'lax'; | ||
} | ||
if (item.httpOnly) { | ||
cookieString += '; HttpOnly'; | ||
} | ||
return cookieString; | ||
} | ||
exports.getCookieString = getCookieString; |
@@ -30,2 +30,3 @@ import { CookieChangeEvent } from './CookieChangeEvent.js'; | ||
domain: null, | ||
httpOnly: false, | ||
}; | ||
@@ -102,2 +103,3 @@ if (typeof init === 'string') { | ||
domain: null, | ||
httpOnly: false, | ||
}; | ||
@@ -104,0 +106,0 @@ if (typeof init === 'string') { |
@@ -13,2 +13,5 @@ export function getCookieString(item) { | ||
} | ||
else if (item.expires) { | ||
cookieString += '; Expires=' + item.expires.toUTCString(); | ||
} | ||
if ((item.name && item.name.startsWith('__Secure')) || item.secure) { | ||
@@ -29,3 +32,6 @@ item.sameSite = 'lax'; | ||
} | ||
if (item.httpOnly) { | ||
cookieString += '; HttpOnly'; | ||
} | ||
return cookieString; | ||
} |
{ | ||
"name": "@whatwg-node/cookie-store", | ||
"version": "0.2.0", | ||
"version": "0.2.1-rc-20230710182705-1e8ffff", | ||
"description": "Cookie Store", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
@@ -9,2 +9,3 @@ export interface Cookie { | ||
value: string; | ||
httpOnly?: boolean; | ||
} | ||
@@ -29,2 +30,3 @@ export interface CookieStoreDeleteOptions { | ||
sameSite?: CookieSameSite; | ||
httpOnly?: boolean; | ||
} | ||
@@ -31,0 +33,0 @@ export type CookieList = CookieListItem[]; |
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
20095
500