zustand-querystring 0.0.18 → 0.0.19
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/{chunk-STY4LBQG.mjs → chunk-PYA77ZUK.mjs} +1 -1
- package/dist/{chunk-H7YBN6IK.mjs → chunk-S5N6DUVJ.mjs} +1 -1
- package/dist/{chunk-77OZJNG4.mjs → chunk-ZM24AXRE.mjs} +8 -1
- package/dist/index.js +8 -1
- package/dist/index.mjs +3 -3
- package/dist/middleware.js +8 -1
- package/dist/middleware.mjs +2 -2
- package/dist/parser.js +8 -1
- package/dist/parser.mjs +1 -1
- package/dist/utils.js +8 -1
- package/dist/utils.mjs +2 -2
- package/package.json +1 -1
|
@@ -26,6 +26,9 @@ function stringify(input, recursive) {
|
|
|
26
26
|
}
|
|
27
27
|
return "@" + res.join("&") + ";";
|
|
28
28
|
}
|
|
29
|
+
if (input instanceof Date) {
|
|
30
|
+
return "=!Date:" + encodeString(input.toISOString(), valueStringifyRegexp);
|
|
31
|
+
}
|
|
29
32
|
if (typeof input === "object") {
|
|
30
33
|
for (const [key, value] of Object.entries(input)) {
|
|
31
34
|
const stringifiedValue = stringify(value, true);
|
|
@@ -65,7 +68,11 @@ function parse(str) {
|
|
|
65
68
|
function parseToken() {
|
|
66
69
|
const type = str.charAt(pos++);
|
|
67
70
|
if (type === "=") {
|
|
68
|
-
|
|
71
|
+
const value = readToken(valueParseRegexp);
|
|
72
|
+
if (value.startsWith("!Date:")) {
|
|
73
|
+
return new Date(value.slice("!Date:".length));
|
|
74
|
+
}
|
|
75
|
+
return value;
|
|
69
76
|
}
|
|
70
77
|
if (type === ":") {
|
|
71
78
|
const value = readToken(valueParseRegexp);
|
package/dist/index.js
CHANGED
|
@@ -54,6 +54,9 @@ function stringify(input, recursive) {
|
|
|
54
54
|
}
|
|
55
55
|
return "@" + res.join("&") + ";";
|
|
56
56
|
}
|
|
57
|
+
if (input instanceof Date) {
|
|
58
|
+
return "=!Date:" + encodeString(input.toISOString(), valueStringifyRegexp);
|
|
59
|
+
}
|
|
57
60
|
if (typeof input === "object") {
|
|
58
61
|
for (const [key, value] of Object.entries(input)) {
|
|
59
62
|
const stringifiedValue = stringify(value, true);
|
|
@@ -93,7 +96,11 @@ function parse(str) {
|
|
|
93
96
|
function parseToken() {
|
|
94
97
|
const type = str.charAt(pos++);
|
|
95
98
|
if (type === "=") {
|
|
96
|
-
|
|
99
|
+
const value = readToken(valueParseRegexp);
|
|
100
|
+
if (value.startsWith("!Date:")) {
|
|
101
|
+
return new Date(value.slice("!Date:".length));
|
|
102
|
+
}
|
|
103
|
+
return value;
|
|
97
104
|
}
|
|
98
105
|
if (type === ":") {
|
|
99
106
|
const value = readToken(valueParseRegexp);
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
querystring
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-S5N6DUVJ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
createURL
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PYA77ZUK.mjs";
|
|
7
7
|
import {
|
|
8
8
|
parse,
|
|
9
9
|
stringify
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZM24AXRE.mjs";
|
|
11
11
|
export {
|
|
12
12
|
createURL,
|
|
13
13
|
parse,
|
package/dist/middleware.js
CHANGED
|
@@ -51,6 +51,9 @@ function stringify(input, recursive) {
|
|
|
51
51
|
}
|
|
52
52
|
return "@" + res.join("&") + ";";
|
|
53
53
|
}
|
|
54
|
+
if (input instanceof Date) {
|
|
55
|
+
return "=!Date:" + encodeString(input.toISOString(), valueStringifyRegexp);
|
|
56
|
+
}
|
|
54
57
|
if (typeof input === "object") {
|
|
55
58
|
for (const [key, value] of Object.entries(input)) {
|
|
56
59
|
const stringifiedValue = stringify(value, true);
|
|
@@ -90,7 +93,11 @@ function parse(str) {
|
|
|
90
93
|
function parseToken() {
|
|
91
94
|
const type = str.charAt(pos++);
|
|
92
95
|
if (type === "=") {
|
|
93
|
-
|
|
96
|
+
const value = readToken(valueParseRegexp);
|
|
97
|
+
if (value.startsWith("!Date:")) {
|
|
98
|
+
return new Date(value.slice("!Date:".length));
|
|
99
|
+
}
|
|
100
|
+
return value;
|
|
94
101
|
}
|
|
95
102
|
if (type === ":") {
|
|
96
103
|
const value = readToken(valueParseRegexp);
|
package/dist/middleware.mjs
CHANGED
package/dist/parser.js
CHANGED
|
@@ -50,6 +50,9 @@ function stringify(input, recursive) {
|
|
|
50
50
|
}
|
|
51
51
|
return "@" + res.join("&") + ";";
|
|
52
52
|
}
|
|
53
|
+
if (input instanceof Date) {
|
|
54
|
+
return "=!Date:" + encodeString(input.toISOString(), valueStringifyRegexp);
|
|
55
|
+
}
|
|
53
56
|
if (typeof input === "object") {
|
|
54
57
|
for (const [key, value] of Object.entries(input)) {
|
|
55
58
|
const stringifiedValue = stringify(value, true);
|
|
@@ -89,7 +92,11 @@ function parse(str) {
|
|
|
89
92
|
function parseToken() {
|
|
90
93
|
const type = str.charAt(pos++);
|
|
91
94
|
if (type === "=") {
|
|
92
|
-
|
|
95
|
+
const value = readToken(valueParseRegexp);
|
|
96
|
+
if (value.startsWith("!Date:")) {
|
|
97
|
+
return new Date(value.slice("!Date:".length));
|
|
98
|
+
}
|
|
99
|
+
return value;
|
|
93
100
|
}
|
|
94
101
|
if (type === ":") {
|
|
95
102
|
const value = readToken(valueParseRegexp);
|
package/dist/parser.mjs
CHANGED
package/dist/utils.js
CHANGED
|
@@ -51,6 +51,9 @@ function stringify(input, recursive) {
|
|
|
51
51
|
}
|
|
52
52
|
return "@" + res.join("&") + ";";
|
|
53
53
|
}
|
|
54
|
+
if (input instanceof Date) {
|
|
55
|
+
return "=!Date:" + encodeString(input.toISOString(), valueStringifyRegexp);
|
|
56
|
+
}
|
|
54
57
|
if (typeof input === "object") {
|
|
55
58
|
for (const [key, value] of Object.entries(input)) {
|
|
56
59
|
const stringifiedValue = stringify(value, true);
|
|
@@ -90,7 +93,11 @@ function parse(str) {
|
|
|
90
93
|
function parseToken() {
|
|
91
94
|
const type = str.charAt(pos++);
|
|
92
95
|
if (type === "=") {
|
|
93
|
-
|
|
96
|
+
const value = readToken(valueParseRegexp);
|
|
97
|
+
if (value.startsWith("!Date:")) {
|
|
98
|
+
return new Date(value.slice("!Date:".length));
|
|
99
|
+
}
|
|
100
|
+
return value;
|
|
94
101
|
}
|
|
95
102
|
if (type === ":") {
|
|
96
103
|
const value = readToken(valueParseRegexp);
|
package/dist/utils.mjs
CHANGED