htmx-router 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cookies.d.ts +1 -1
- package/cookies.js +3 -2
- package/package.json +1 -1
package/cookies.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare class Cookies {
|
|
|
24
24
|
has(name: string): boolean;
|
|
25
25
|
set(name: string, value: string, options?: CookieOptions): void;
|
|
26
26
|
private string;
|
|
27
|
-
unset(name: string): void;
|
|
27
|
+
unset(name: string, options?: CookieOptions): void;
|
|
28
28
|
/** Creates the response headers required to make the changes done to these cookies */
|
|
29
29
|
export(): string[];
|
|
30
30
|
}
|
package/cookies.js
CHANGED
|
@@ -55,9 +55,10 @@ export class Cookies {
|
|
|
55
55
|
return encodeURIComponent(name) + "=" + encodeURIComponent(this.map[name]) + StringifyOptions(this.config[name]);
|
|
56
56
|
;
|
|
57
57
|
}
|
|
58
|
-
unset(name) {
|
|
58
|
+
unset(name, options = { maxAge: -1 }) {
|
|
59
|
+
options.maxAge ||= -1;
|
|
59
60
|
this.parse();
|
|
60
|
-
return this.set(name, "",
|
|
61
|
+
return this.set(name, "", options);
|
|
61
62
|
}
|
|
62
63
|
/** Creates the response headers required to make the changes done to these cookies */
|
|
63
64
|
export() {
|