better-call 1.0.4 → 1.0.6-beta.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/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +12 -5
- package/dist/client.d.ts +12 -5
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +36 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +36 -8
- package/dist/index.js.map +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/{router-uAmry411.d.cts → router-D9DesiMG.d.cts} +369 -225
- package/dist/{router-uAmry411.d.ts → router-D9DesiMG.d.ts} +369 -225
- package/package.json +9 -5
package/dist/client.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/client.ts"],"sourcesContent":["import { type BetterFetchOption, type BetterFetchResponse, createFetch } from \"@better-fetch/fetch\";\nimport type { Router } from \"./router\";\nimport type { HasRequiredKeys, Prettify, UnionToIntersection } from \"./helper\";\nimport type { Endpoint } from \"./endpoint\";\n\ntype HasRequired<\n\tT extends {\n\t\tbody?: any;\n\t\tquery?: any;\n\t\tparams?: any;\n\t},\n> = HasRequiredKeys<T> extends true\n\t? HasRequiredKeys<T[\"body\"]> extends false\n\t\t? HasRequiredKeys<T[\"query\"]> extends false\n\t\t\t? HasRequiredKeys<T[\"params\"]> extends false\n\t\t\t\t? false\n\t\t\t\t: true\n\t\t\t: true\n\t\t: true\n\t: true;\n\ntype InferContext<T> = T extends (ctx: infer Ctx) => any\n\t? Ctx extends object\n\t\t? Ctx\n\t\t: never\n\t: never;\n\nexport interface ClientOptions extends BetterFetchOption {\n\tbaseURL: string;\n}\n\ntype WithRequired<T, K> = T & {\n\t[P in K extends string ? K : never]-?: T[P extends keyof T ? P : never];\n};\n\nexport type RequiredOptionKeys<\n\tC extends {\n\t\tbody?: any;\n\t\tquery?: any;\n\t\tparams?: any;\n\t},\n> = (undefined extends C[\"body\"]\n\t? {}\n\t: {\n\t\t\tbody: true;\n\t\t}) &\n\t(undefined extends C[\"query\"]\n\t\t? {}\n\t\t: {\n\t\t\t\tquery: true;\n\t\t\t}) &\n\t(undefined extends C[\"params\"]\n\t\t? {}\n\t\t: {\n\t\t\t\tparams: true;\n\t\t\t});\n\nexport const createClient = <R extends Router | Router[\"endpoints\"]>(options: ClientOptions) => {\n\tconst fetch = createFetch(options);\n\ttype API =
|
|
1
|
+
{"version":3,"sources":["../src/client.ts"],"sourcesContent":["import { type BetterFetchOption, type BetterFetchResponse, createFetch } from \"@better-fetch/fetch\";\nimport type { Router } from \"./router\";\nimport type { HasRequiredKeys, Prettify, UnionToIntersection } from \"./helper\";\nimport type { Endpoint } from \"./endpoint\";\n\ntype HasRequired<\n\tT extends {\n\t\tbody?: any;\n\t\tquery?: any;\n\t\tparams?: any;\n\t},\n> = HasRequiredKeys<T> extends true\n\t? HasRequiredKeys<T[\"body\"]> extends false\n\t\t? HasRequiredKeys<T[\"query\"]> extends false\n\t\t\t? HasRequiredKeys<T[\"params\"]> extends false\n\t\t\t\t? false\n\t\t\t\t: true\n\t\t\t: true\n\t\t: true\n\t: true;\n\ntype InferContext<T> = T extends (ctx: infer Ctx) => any\n\t? Ctx extends object\n\t\t? Ctx\n\t\t: never\n\t: never;\n\nexport interface ClientOptions extends BetterFetchOption {\n\tbaseURL: string;\n}\n\ntype WithRequired<T, K> = T & {\n\t[P in K extends string ? K : never]-?: T[P extends keyof T ? P : never];\n};\n\ntype WithoutServerOnly<T extends Record<string, Endpoint>> = {\n\t[K in keyof T]: T[K] extends Endpoint<any, infer O>\n\t\t? O extends { metadata: { SERVER_ONLY: true } }\n\t\t\t? never\n\t\t\t: T[K]\n\t\t: T[K];\n};\n\nexport type RequiredOptionKeys<\n\tC extends {\n\t\tbody?: any;\n\t\tquery?: any;\n\t\tparams?: any;\n\t},\n> = (undefined extends C[\"body\"]\n\t? {}\n\t: {\n\t\t\tbody: true;\n\t\t}) &\n\t(undefined extends C[\"query\"]\n\t\t? {}\n\t\t: {\n\t\t\t\tquery: true;\n\t\t\t}) &\n\t(undefined extends C[\"params\"]\n\t\t? {}\n\t\t: {\n\t\t\t\tparams: true;\n\t\t\t});\n\nexport const createClient = <R extends Router | Router[\"endpoints\"]>(options: ClientOptions) => {\n\tconst fetch = createFetch(options);\n\ttype API = WithoutServerOnly<\n\t\tR extends { endpoints: Record<string, Endpoint> } ? R[\"endpoints\"] : R\n\t>;\n\ttype Options = API extends {\n\t\t[key: string]: infer T;\n\t}\n\t\t? T extends Endpoint\n\t\t\t? {\n\t\t\t\t\t[key in T[\"options\"][\"method\"] extends \"GET\"\n\t\t\t\t\t\t? T[\"path\"]\n\t\t\t\t\t\t: `@${T[\"options\"][\"method\"] extends string ? Lowercase<T[\"options\"][\"method\"]> : never}${T[\"path\"]}`]: T;\n\t\t\t\t}\n\t\t\t: {}\n\t\t: {};\n\n\ttype O = Prettify<UnionToIntersection<Options>>;\n\treturn async <OPT extends O, K extends keyof OPT, C extends InferContext<OPT[K]>>(\n\t\tpath: K,\n\t\t...options: HasRequired<C> extends true\n\t\t\t? [\n\t\t\t\t\tWithRequired<\n\t\t\t\t\t\tBetterFetchOption<C[\"body\"], C[\"query\"], C[\"params\"]>,\n\t\t\t\t\t\tkeyof RequiredOptionKeys<C>\n\t\t\t\t\t>,\n\t\t\t\t]\n\t\t\t: [BetterFetchOption<C[\"body\"], C[\"query\"], C[\"params\"]>?]\n\t): Promise<\n\t\tBetterFetchResponse<Awaited<ReturnType<OPT[K] extends Endpoint ? OPT[K] : never>>>\n\t> => {\n\t\treturn (await fetch(path as string, {\n\t\t\t...options[0],\n\t\t})) as any;\n\t};\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA8E;AAiEvE,IAAM,eAAe,CAAyC,YAA2B;AAC/F,QAAM,YAAQ,0BAAY,OAAO;AAiBjC,SAAO,OACN,SACGA,aAUC;AACJ,WAAQ,MAAM,MAAM,MAAgB;AAAA,MACnC,GAAGA,SAAQ,CAAC;AAAA,IACb,CAAC;AAAA,EACF;AACD;","names":["options"]}
|
package/dist/client.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BetterFetchOption, BetterFetchResponse } from '@better-fetch/fetch';
|
|
2
|
-
import { j as Router,
|
|
2
|
+
import { j as Router, X as UnionToIntersection, b as Endpoint, U as HasRequiredKeys } from './router-D9DesiMG.cjs';
|
|
3
3
|
|
|
4
4
|
type HasRequired<T extends {
|
|
5
5
|
body?: any;
|
|
@@ -13,6 +13,13 @@ interface ClientOptions extends BetterFetchOption {
|
|
|
13
13
|
type WithRequired<T, K> = T & {
|
|
14
14
|
[P in K extends string ? K : never]-?: T[P extends keyof T ? P : never];
|
|
15
15
|
};
|
|
16
|
+
type WithoutServerOnly<T extends Record<string, Endpoint>> = {
|
|
17
|
+
[K in keyof T]: T[K] extends Endpoint<any, infer O> ? O extends {
|
|
18
|
+
metadata: {
|
|
19
|
+
SERVER_ONLY: true;
|
|
20
|
+
};
|
|
21
|
+
} ? never : T[K] : T[K];
|
|
22
|
+
};
|
|
16
23
|
type RequiredOptionKeys<C extends {
|
|
17
24
|
body?: any;
|
|
18
25
|
query?: any;
|
|
@@ -24,13 +31,13 @@ type RequiredOptionKeys<C extends {
|
|
|
24
31
|
}) & (undefined extends C["params"] ? {} : {
|
|
25
32
|
params: true;
|
|
26
33
|
});
|
|
27
|
-
declare const createClient: <R extends Router | Router["endpoints"]>(options: ClientOptions) => <OPT extends UnionToIntersection<
|
|
34
|
+
declare const createClient: <R extends Router | Router["endpoints"]>(options: ClientOptions) => <OPT extends UnionToIntersection<WithoutServerOnly<R extends {
|
|
28
35
|
endpoints: Record<string, Endpoint>;
|
|
29
|
-
} ? R["endpoints"] : R
|
|
36
|
+
} ? R["endpoints"] : R> extends {
|
|
30
37
|
[key: string]: infer T_1;
|
|
31
|
-
} ? T_1 extends Endpoint ? { [key in T_1["options"]["method"] extends "GET" ? T_1["path"] : `@${T_1["options"]["method"] extends string ? Lowercase<T_1["options"]["method"]> : never}${T_1["path"]}`]: T_1; } : {} : {}> extends infer T ? { [K_1 in keyof T]: UnionToIntersection<
|
|
38
|
+
} ? T_1 extends Endpoint ? { [key in T_1["options"]["method"] extends "GET" ? T_1["path"] : `@${T_1["options"]["method"] extends string ? Lowercase<T_1["options"]["method"]> : never}${T_1["path"]}`]: T_1; } : {} : {}> extends infer T ? { [K_1 in keyof T]: UnionToIntersection<WithoutServerOnly<R extends {
|
|
32
39
|
endpoints: Record<string, Endpoint>;
|
|
33
|
-
} ? R["endpoints"] : R
|
|
40
|
+
} ? R["endpoints"] : R> extends {
|
|
34
41
|
[key: string]: infer T_1;
|
|
35
42
|
} ? T_1 extends Endpoint ? { [key in T_1["options"]["method"] extends "GET" ? T_1["path"] : `@${T_1["options"]["method"] extends string ? Lowercase<T_1["options"]["method"]> : never}${T_1["path"]}`]: T_1; } : {} : {}>[K_1]; } : never, K extends keyof OPT, C extends InferContext<OPT[K]>>(path: K, ...options: HasRequired<C> extends true ? [WithRequired<BetterFetchOption<C["body"], C["query"], C["params"]>, keyof RequiredOptionKeys<C>>] : [BetterFetchOption<C["body"], C["query"], C["params"]>?]) => Promise<BetterFetchResponse<Awaited<ReturnType<OPT[K] extends Endpoint ? OPT[K] : never>>>>;
|
|
36
43
|
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BetterFetchOption, BetterFetchResponse } from '@better-fetch/fetch';
|
|
2
|
-
import { j as Router,
|
|
2
|
+
import { j as Router, X as UnionToIntersection, b as Endpoint, U as HasRequiredKeys } from './router-D9DesiMG.js';
|
|
3
3
|
|
|
4
4
|
type HasRequired<T extends {
|
|
5
5
|
body?: any;
|
|
@@ -13,6 +13,13 @@ interface ClientOptions extends BetterFetchOption {
|
|
|
13
13
|
type WithRequired<T, K> = T & {
|
|
14
14
|
[P in K extends string ? K : never]-?: T[P extends keyof T ? P : never];
|
|
15
15
|
};
|
|
16
|
+
type WithoutServerOnly<T extends Record<string, Endpoint>> = {
|
|
17
|
+
[K in keyof T]: T[K] extends Endpoint<any, infer O> ? O extends {
|
|
18
|
+
metadata: {
|
|
19
|
+
SERVER_ONLY: true;
|
|
20
|
+
};
|
|
21
|
+
} ? never : T[K] : T[K];
|
|
22
|
+
};
|
|
16
23
|
type RequiredOptionKeys<C extends {
|
|
17
24
|
body?: any;
|
|
18
25
|
query?: any;
|
|
@@ -24,13 +31,13 @@ type RequiredOptionKeys<C extends {
|
|
|
24
31
|
}) & (undefined extends C["params"] ? {} : {
|
|
25
32
|
params: true;
|
|
26
33
|
});
|
|
27
|
-
declare const createClient: <R extends Router | Router["endpoints"]>(options: ClientOptions) => <OPT extends UnionToIntersection<
|
|
34
|
+
declare const createClient: <R extends Router | Router["endpoints"]>(options: ClientOptions) => <OPT extends UnionToIntersection<WithoutServerOnly<R extends {
|
|
28
35
|
endpoints: Record<string, Endpoint>;
|
|
29
|
-
} ? R["endpoints"] : R
|
|
36
|
+
} ? R["endpoints"] : R> extends {
|
|
30
37
|
[key: string]: infer T_1;
|
|
31
|
-
} ? T_1 extends Endpoint ? { [key in T_1["options"]["method"] extends "GET" ? T_1["path"] : `@${T_1["options"]["method"] extends string ? Lowercase<T_1["options"]["method"]> : never}${T_1["path"]}`]: T_1; } : {} : {}> extends infer T ? { [K_1 in keyof T]: UnionToIntersection<
|
|
38
|
+
} ? T_1 extends Endpoint ? { [key in T_1["options"]["method"] extends "GET" ? T_1["path"] : `@${T_1["options"]["method"] extends string ? Lowercase<T_1["options"]["method"]> : never}${T_1["path"]}`]: T_1; } : {} : {}> extends infer T ? { [K_1 in keyof T]: UnionToIntersection<WithoutServerOnly<R extends {
|
|
32
39
|
endpoints: Record<string, Endpoint>;
|
|
33
|
-
} ? R["endpoints"] : R
|
|
40
|
+
} ? R["endpoints"] : R> extends {
|
|
34
41
|
[key: string]: infer T_1;
|
|
35
42
|
} ? T_1 extends Endpoint ? { [key in T_1["options"]["method"] extends "GET" ? T_1["path"] : `@${T_1["options"]["method"] extends string ? Lowercase<T_1["options"]["method"]> : never}${T_1["path"]}`]: T_1; } : {} : {}>[K_1]; } : never, K extends keyof OPT, C extends InferContext<OPT[K]>>(path: K, ...options: HasRequired<C> extends true ? [WithRequired<BetterFetchOption<C["body"], C["query"], C["params"]>, keyof RequiredOptionKeys<C>>] : [BetterFetchOption<C["body"], C["query"], C["params"]>?]) => Promise<BetterFetchResponse<Awaited<ReturnType<OPT[K] extends Endpoint ? OPT[K] : never>>>>;
|
|
36
43
|
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/client.ts"],"sourcesContent":["import { type BetterFetchOption, type BetterFetchResponse, createFetch } from \"@better-fetch/fetch\";\nimport type { Router } from \"./router\";\nimport type { HasRequiredKeys, Prettify, UnionToIntersection } from \"./helper\";\nimport type { Endpoint } from \"./endpoint\";\n\ntype HasRequired<\n\tT extends {\n\t\tbody?: any;\n\t\tquery?: any;\n\t\tparams?: any;\n\t},\n> = HasRequiredKeys<T> extends true\n\t? HasRequiredKeys<T[\"body\"]> extends false\n\t\t? HasRequiredKeys<T[\"query\"]> extends false\n\t\t\t? HasRequiredKeys<T[\"params\"]> extends false\n\t\t\t\t? false\n\t\t\t\t: true\n\t\t\t: true\n\t\t: true\n\t: true;\n\ntype InferContext<T> = T extends (ctx: infer Ctx) => any\n\t? Ctx extends object\n\t\t? Ctx\n\t\t: never\n\t: never;\n\nexport interface ClientOptions extends BetterFetchOption {\n\tbaseURL: string;\n}\n\ntype WithRequired<T, K> = T & {\n\t[P in K extends string ? K : never]-?: T[P extends keyof T ? P : never];\n};\n\nexport type RequiredOptionKeys<\n\tC extends {\n\t\tbody?: any;\n\t\tquery?: any;\n\t\tparams?: any;\n\t},\n> = (undefined extends C[\"body\"]\n\t? {}\n\t: {\n\t\t\tbody: true;\n\t\t}) &\n\t(undefined extends C[\"query\"]\n\t\t? {}\n\t\t: {\n\t\t\t\tquery: true;\n\t\t\t}) &\n\t(undefined extends C[\"params\"]\n\t\t? {}\n\t\t: {\n\t\t\t\tparams: true;\n\t\t\t});\n\nexport const createClient = <R extends Router | Router[\"endpoints\"]>(options: ClientOptions) => {\n\tconst fetch = createFetch(options);\n\ttype API =
|
|
1
|
+
{"version":3,"sources":["../src/client.ts"],"sourcesContent":["import { type BetterFetchOption, type BetterFetchResponse, createFetch } from \"@better-fetch/fetch\";\nimport type { Router } from \"./router\";\nimport type { HasRequiredKeys, Prettify, UnionToIntersection } from \"./helper\";\nimport type { Endpoint } from \"./endpoint\";\n\ntype HasRequired<\n\tT extends {\n\t\tbody?: any;\n\t\tquery?: any;\n\t\tparams?: any;\n\t},\n> = HasRequiredKeys<T> extends true\n\t? HasRequiredKeys<T[\"body\"]> extends false\n\t\t? HasRequiredKeys<T[\"query\"]> extends false\n\t\t\t? HasRequiredKeys<T[\"params\"]> extends false\n\t\t\t\t? false\n\t\t\t\t: true\n\t\t\t: true\n\t\t: true\n\t: true;\n\ntype InferContext<T> = T extends (ctx: infer Ctx) => any\n\t? Ctx extends object\n\t\t? Ctx\n\t\t: never\n\t: never;\n\nexport interface ClientOptions extends BetterFetchOption {\n\tbaseURL: string;\n}\n\ntype WithRequired<T, K> = T & {\n\t[P in K extends string ? K : never]-?: T[P extends keyof T ? P : never];\n};\n\ntype WithoutServerOnly<T extends Record<string, Endpoint>> = {\n\t[K in keyof T]: T[K] extends Endpoint<any, infer O>\n\t\t? O extends { metadata: { SERVER_ONLY: true } }\n\t\t\t? never\n\t\t\t: T[K]\n\t\t: T[K];\n};\n\nexport type RequiredOptionKeys<\n\tC extends {\n\t\tbody?: any;\n\t\tquery?: any;\n\t\tparams?: any;\n\t},\n> = (undefined extends C[\"body\"]\n\t? {}\n\t: {\n\t\t\tbody: true;\n\t\t}) &\n\t(undefined extends C[\"query\"]\n\t\t? {}\n\t\t: {\n\t\t\t\tquery: true;\n\t\t\t}) &\n\t(undefined extends C[\"params\"]\n\t\t? {}\n\t\t: {\n\t\t\t\tparams: true;\n\t\t\t});\n\nexport const createClient = <R extends Router | Router[\"endpoints\"]>(options: ClientOptions) => {\n\tconst fetch = createFetch(options);\n\ttype API = WithoutServerOnly<\n\t\tR extends { endpoints: Record<string, Endpoint> } ? R[\"endpoints\"] : R\n\t>;\n\ttype Options = API extends {\n\t\t[key: string]: infer T;\n\t}\n\t\t? T extends Endpoint\n\t\t\t? {\n\t\t\t\t\t[key in T[\"options\"][\"method\"] extends \"GET\"\n\t\t\t\t\t\t? T[\"path\"]\n\t\t\t\t\t\t: `@${T[\"options\"][\"method\"] extends string ? Lowercase<T[\"options\"][\"method\"]> : never}${T[\"path\"]}`]: T;\n\t\t\t\t}\n\t\t\t: {}\n\t\t: {};\n\n\ttype O = Prettify<UnionToIntersection<Options>>;\n\treturn async <OPT extends O, K extends keyof OPT, C extends InferContext<OPT[K]>>(\n\t\tpath: K,\n\t\t...options: HasRequired<C> extends true\n\t\t\t? [\n\t\t\t\t\tWithRequired<\n\t\t\t\t\t\tBetterFetchOption<C[\"body\"], C[\"query\"], C[\"params\"]>,\n\t\t\t\t\t\tkeyof RequiredOptionKeys<C>\n\t\t\t\t\t>,\n\t\t\t\t]\n\t\t\t: [BetterFetchOption<C[\"body\"], C[\"query\"], C[\"params\"]>?]\n\t): Promise<\n\t\tBetterFetchResponse<Awaited<ReturnType<OPT[K] extends Endpoint ? OPT[K] : never>>>\n\t> => {\n\t\treturn (await fetch(path as string, {\n\t\t\t...options[0],\n\t\t})) as any;\n\t};\n};\n"],"mappings":";AAAA,SAA2D,mBAAmB;AAiEvE,IAAM,eAAe,CAAyC,YAA2B;AAC/F,QAAM,QAAQ,YAAY,OAAO;AAiBjC,SAAO,OACN,SACGA,aAUC;AACJ,WAAQ,MAAM,MAAM,MAAgB;AAAA,MACnC,GAAGA,SAAQ,CAAC;AAAA,IACb,CAAC;AAAA,EACF;AACD;","names":["options"]}
|
package/dist/index.cjs
CHANGED
|
@@ -151,6 +151,13 @@ async function getBody(request) {
|
|
|
151
151
|
function isAPIError(error) {
|
|
152
152
|
return error instanceof APIError || error?.name === "APIError";
|
|
153
153
|
}
|
|
154
|
+
function tryDecode(str) {
|
|
155
|
+
try {
|
|
156
|
+
return str.includes("%") ? decodeURIComponent(str) : str;
|
|
157
|
+
} catch {
|
|
158
|
+
return str;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
154
161
|
|
|
155
162
|
// src/to-response.ts
|
|
156
163
|
function isJSONSerializable(value) {
|
|
@@ -328,14 +335,35 @@ var getCookieKey = (key, prefix) => {
|
|
|
328
335
|
}
|
|
329
336
|
return finalKey;
|
|
330
337
|
};
|
|
331
|
-
function parseCookies(
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
338
|
+
function parseCookies(str) {
|
|
339
|
+
if (typeof str !== "string") {
|
|
340
|
+
throw new TypeError("argument str must be a string");
|
|
341
|
+
}
|
|
342
|
+
const cookies = /* @__PURE__ */ new Map();
|
|
343
|
+
let index = 0;
|
|
344
|
+
while (index < str.length) {
|
|
345
|
+
const eqIdx = str.indexOf("=", index);
|
|
346
|
+
if (eqIdx === -1) {
|
|
347
|
+
break;
|
|
348
|
+
}
|
|
349
|
+
let endIdx = str.indexOf(";", index);
|
|
350
|
+
if (endIdx === -1) {
|
|
351
|
+
endIdx = str.length;
|
|
352
|
+
} else if (endIdx < eqIdx) {
|
|
353
|
+
index = str.lastIndexOf(";", eqIdx - 1) + 1;
|
|
354
|
+
continue;
|
|
355
|
+
}
|
|
356
|
+
const key = str.slice(index, eqIdx).trim();
|
|
357
|
+
if (!cookies.has(key)) {
|
|
358
|
+
let val = str.slice(eqIdx + 1, endIdx).trim();
|
|
359
|
+
if (val.codePointAt(0) === 34) {
|
|
360
|
+
val = val.slice(1, -1);
|
|
361
|
+
}
|
|
362
|
+
cookies.set(key, tryDecode(val));
|
|
363
|
+
}
|
|
364
|
+
index = endIdx + 1;
|
|
365
|
+
}
|
|
366
|
+
return cookies;
|
|
339
367
|
}
|
|
340
368
|
var _serialize = (key, value, opt = {}) => {
|
|
341
369
|
let cookie;
|