@calcit/procs 0.5.3 → 0.5.7
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/lib/calcit.procs.js +8 -2
- package/package.json +1 -1
- package/ts-src/calcit.procs.ts +9 -3
package/lib/calcit.procs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _a;
|
|
2
2
|
// CALCIT VERSION
|
|
3
|
-
export const calcit_version = "0.5.
|
|
3
|
+
export const calcit_version = "0.5.7";
|
|
4
4
|
import "@calcit/ternary-tree";
|
|
5
5
|
import { parse } from "@cirru/parser.ts";
|
|
6
6
|
import { writeCirruCode } from "@cirru/writer.ts";
|
|
@@ -938,7 +938,13 @@ export let identical_$q_ = (x, y) => {
|
|
|
938
938
|
return x === y;
|
|
939
939
|
};
|
|
940
940
|
export let starts_with_$q_ = (xs, y) => {
|
|
941
|
-
|
|
941
|
+
if (typeof xs === "string" && typeof y === "string") {
|
|
942
|
+
return xs.startsWith(y);
|
|
943
|
+
}
|
|
944
|
+
if (xs instanceof CalcitKeyword && y instanceof CalcitKeyword) {
|
|
945
|
+
return xs.value.startsWith(y.value);
|
|
946
|
+
}
|
|
947
|
+
throw new Error("expected strings or keywords");
|
|
942
948
|
};
|
|
943
949
|
export let ends_with_$q_ = (xs, y) => {
|
|
944
950
|
return xs.endsWith(y);
|
package/package.json
CHANGED
package/ts-src/calcit.procs.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// CALCIT VERSION
|
|
2
|
-
export const calcit_version = "0.5.
|
|
2
|
+
export const calcit_version = "0.5.7";
|
|
3
3
|
|
|
4
4
|
import { overwriteComparator, initTernaryTreeMap } from "@calcit/ternary-tree";
|
|
5
5
|
import { parse, ICirruNode } from "@cirru/parser.ts";
|
|
@@ -1018,8 +1018,14 @@ export let identical_$q_ = (x: CalcitValue, y: CalcitValue): boolean => {
|
|
|
1018
1018
|
return x === y;
|
|
1019
1019
|
};
|
|
1020
1020
|
|
|
1021
|
-
export let starts_with_$q_ = (xs:
|
|
1022
|
-
|
|
1021
|
+
export let starts_with_$q_ = (xs: CalcitValue, y: CalcitValue): boolean => {
|
|
1022
|
+
if (typeof xs === "string" && typeof y === "string") {
|
|
1023
|
+
return xs.startsWith(y);
|
|
1024
|
+
}
|
|
1025
|
+
if (xs instanceof CalcitKeyword && y instanceof CalcitKeyword) {
|
|
1026
|
+
return xs.value.startsWith(y.value);
|
|
1027
|
+
}
|
|
1028
|
+
throw new Error("expected strings or keywords");
|
|
1023
1029
|
};
|
|
1024
1030
|
export let ends_with_$q_ = (xs: string, y: string): boolean => {
|
|
1025
1031
|
return xs.endsWith(y);
|