webpipe-js 2.0.24 → 2.0.25
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/index.cjs +10 -0
- package/dist/index.mjs +10 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1062,6 +1062,10 @@ var Parser = class {
|
|
|
1062
1062
|
if (bt !== null) return bt;
|
|
1063
1063
|
const qt = this.tryParse(() => this.parseQuotedString());
|
|
1064
1064
|
if (qt !== null) return qt;
|
|
1065
|
+
if (this.text.startsWith("null", this.pos)) {
|
|
1066
|
+
this.pos += 4;
|
|
1067
|
+
return "null";
|
|
1068
|
+
}
|
|
1065
1069
|
if (this.text.startsWith("true", this.pos)) {
|
|
1066
1070
|
this.pos += 4;
|
|
1067
1071
|
return "true";
|
|
@@ -1073,6 +1077,12 @@ var Parser = class {
|
|
|
1073
1077
|
const num = this.tryParse(() => {
|
|
1074
1078
|
const digits = this.consumeWhile((c) => /[0-9]/.test(c));
|
|
1075
1079
|
if (digits.length === 0) throw new Error("number");
|
|
1080
|
+
if (this.cur() === ".") {
|
|
1081
|
+
this.pos++;
|
|
1082
|
+
const decimals = this.consumeWhile((c) => /[0-9]/.test(c));
|
|
1083
|
+
if (decimals.length === 0) throw new Error("Expected digits after decimal point");
|
|
1084
|
+
return digits + "." + decimals;
|
|
1085
|
+
}
|
|
1076
1086
|
return digits;
|
|
1077
1087
|
});
|
|
1078
1088
|
if (num !== null) return num;
|
package/dist/index.mjs
CHANGED
|
@@ -1012,6 +1012,10 @@ var Parser = class {
|
|
|
1012
1012
|
if (bt !== null) return bt;
|
|
1013
1013
|
const qt = this.tryParse(() => this.parseQuotedString());
|
|
1014
1014
|
if (qt !== null) return qt;
|
|
1015
|
+
if (this.text.startsWith("null", this.pos)) {
|
|
1016
|
+
this.pos += 4;
|
|
1017
|
+
return "null";
|
|
1018
|
+
}
|
|
1015
1019
|
if (this.text.startsWith("true", this.pos)) {
|
|
1016
1020
|
this.pos += 4;
|
|
1017
1021
|
return "true";
|
|
@@ -1023,6 +1027,12 @@ var Parser = class {
|
|
|
1023
1027
|
const num = this.tryParse(() => {
|
|
1024
1028
|
const digits = this.consumeWhile((c) => /[0-9]/.test(c));
|
|
1025
1029
|
if (digits.length === 0) throw new Error("number");
|
|
1030
|
+
if (this.cur() === ".") {
|
|
1031
|
+
this.pos++;
|
|
1032
|
+
const decimals = this.consumeWhile((c) => /[0-9]/.test(c));
|
|
1033
|
+
if (decimals.length === 0) throw new Error("Expected digits after decimal point");
|
|
1034
|
+
return digits + "." + decimals;
|
|
1035
|
+
}
|
|
1026
1036
|
return digits;
|
|
1027
1037
|
});
|
|
1028
1038
|
if (num !== null) return num;
|